mirror of
https://github.com/electron/node-gyp.git
synced 2025-08-15 12:58:19 +02:00
gyp: modify XcodeVersion() to convert "4.2" to "0420" and "10.0" to "1000"
Ref: https://github.com/nodejs/node-addon-api/issues/445#issuecomment-535361389 PR-URL: https://github.com/nodejs/node-gyp/pull/1895 Reviewed-By: Rod Vagg <rod@vagg.org>
This commit is contained in:
parent
67dec1496a
commit
8e9ec3b024
1 changed files with 3 additions and 3 deletions
|
@ -1286,9 +1286,9 @@ def XcodeVersion():
|
|||
version_list = [version, '']
|
||||
version = version_list[0]
|
||||
build = version_list[-1]
|
||||
# Be careful to convert "4.2" to "0420":
|
||||
version = version.split()[-1].replace('.', '')
|
||||
version = (version + '0' * (3 - len(version))).zfill(4)
|
||||
# Be careful to convert "4.2" to "0420" and "10.0" to "1000":
|
||||
version = format(''.join((version.split()[-1].split('.') + ['0', '0'])[:3]),
|
||||
'>04s')
|
||||
if build:
|
||||
build = build.split()[-1]
|
||||
XCODE_VERSION_CACHE = (version, build)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue