Allow gyp version var to be set from CLI, but default it to git HEAD.

This commit is contained in:
Nathan Sobo
2013-04-10 11:55:58 -06:00
parent d56946fa6e
commit 2cb18f5855
2 changed files with 4 additions and 2 deletions

View File

@@ -15,7 +15,8 @@ desc "Create xcode project from gyp file"
task "create-xcode-project" => ["update-cef", "update-node"] do
`rm -rf atom.xcodeproj`
`script/generate-sources-gypi`
`gyp --depth=. -D CODE_SIGN="#{ENV['CODE_SIGN']}" atom.gyp`
version = %{-D version="#{ENV['VERSION']}"} if ENV['VERSION']
`gyp --depth=. -D CODE_SIGN="#{ENV['CODE_SIGN']}" #{version} atom.gyp`
end
desc "Update CEF to the latest version specified by the prebuilt-cef submodule"

View File

@@ -2,6 +2,7 @@
'variables': {
'pkg-config': 'pkg-config',
'chromium_code': 1,
'version%': "<!(git rev-parse --short HEAD)",
'use_aura%': 0,
'conditions': [
['OS=="win"', {
@@ -45,7 +46,7 @@
},
},
'xcode_settings': {
'VERSION': "<!(git rev-parse --short HEAD)",
'VERSION': "<(version)",
'CLANG_CXX_LANGUAGE_STANDARD' : 'c++0x',
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'COMBINE_HIDPI_IMAGES': 'YES', # Removes 'Validate Project Settings' warning