mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Don't set version when building on constructicon
This commit is contained in:
@@ -150,11 +150,16 @@ module.exports = (grunt) ->
|
||||
unless /.+\.plist/.test(sourcePath)
|
||||
grunt.file.copy(sourcePath, path.resolve(APP_DIR, '..', subDirectory, filename))
|
||||
|
||||
grunt.task.run('compile', 'update-info-plist', 'codesign')
|
||||
grunt.task.run('compile', 'copy-info-plist', 'codesign')
|
||||
|
||||
grunt.registerTask 'update-info-plist', 'Copy plist and set version to current sha', ->
|
||||
grunt.registerTask 'copy-info-plist', 'Copy plist', ->
|
||||
done = @async()
|
||||
grunt.util.spawn cmd: 'script/update-info-plist', args: [BUILD_DIR], (error, result, code) ->
|
||||
grunt.util.spawn cmd: 'script/copy-info-plist', args: [BUILD_DIR], (error, result, code) ->
|
||||
done(error)
|
||||
|
||||
grunt.registerTask 'set-development-version', "Sets version to current sha", ->
|
||||
done = @async()
|
||||
grunt.util.spawn cmd: 'script/set-version', args: [BUILD_DIR], (error, result, code) ->
|
||||
done(error)
|
||||
|
||||
grunt.registerTask 'codesign', 'Codesign the app', ->
|
||||
|
||||
11
script/copy-info-plist
Executable file
11
script/copy-info-plist
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
BUILT_PRODUCTS_DIR=$1
|
||||
PLIST_PATH="$BUILT_PRODUCTS_DIR/Atom.app/Contents/Info.plist"
|
||||
HELPER_PLIST_PATH="$BUILT_PRODUCTS_DIR/Atom.app/Contents/Frameworks/Atom Helper.app/Contents/Info.plist"
|
||||
|
||||
# Copy custom plist files
|
||||
cp resources/mac/atom-Info.plist "$PLIST_PATH"
|
||||
cp resources/mac/helper-Info.plist "$HELPER_PLIST_PATH"
|
||||
15
script/set-version
Normal file
15
script/set-version
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
BUILT_PRODUCTS_DIR=$1
|
||||
PLIST_PATH="$BUILT_PRODUCTS_DIR/Atom.app/Contents/Info.plist"
|
||||
HELPER_PLIST_PATH="$BUILT_PRODUCTS_DIR/Atom.app/Contents/Frameworks/Atom Helper.app/Contents/Info.plist"
|
||||
|
||||
# Update version
|
||||
VERSION=$(git rev-parse --short HEAD | tr -d "\n")
|
||||
echo $VERSION > "$BUILT_PRODUCTS_DIR/Atom.app/Contents/Resources/version"
|
||||
/usr/libexec/PlistBuddy -c "Set CFBundleShortVersionString $VERSION" "$PLIST_PATH"
|
||||
/usr/libexec/PlistBuddy -c "Set CFBundleVersion $VERSION" "$PLIST_PATH"
|
||||
/usr/libexec/PlistBuddy -c "Set CFBundleShortVersionString $VERSION" "$HELPER_PLIST_PATH"
|
||||
/usr/libexec/PlistBuddy -c "Set CFBundleVersion $VERSION" "$HELPER_PLIST_PATH"
|
||||
Reference in New Issue
Block a user