Merge pull request #1219 from atom/atom-shell-v0.7.5

Update to atom-shell v0.7.6.
This commit is contained in:
Cheng Zhao
2013-12-09 01:00:24 -08:00
3 changed files with 34 additions and 24 deletions

View File

@@ -1,5 +1,6 @@
{
"name": "atom",
"productName": "Atom",
"version": "0.42.0",
"main": "./src/browser/main.js",
"repository": {
@@ -15,7 +16,7 @@
"url": "http://github.com/atom/atom/raw/master/LICENSE.md"
}
],
"atomShellVersion": "0.7.4",
"atomShellVersion": "0.7.6",
"dependencies": {
"async": "0.2.6",
"bootstrap": "git://github.com/benogle/bootstrap.git",

View File

@@ -3,11 +3,11 @@
set -e
BUILT_PRODUCTS_DIR=$1
VERSION=$2
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")
/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"

View File

@@ -1,3 +1,4 @@
fs = require 'fs'
path = require 'path'
module.exports = (grunt) ->
@@ -6,27 +7,35 @@ module.exports = (grunt) ->
grunt.registerTask 'set-development-version', 'Sets version to current SHA-1', ->
done = @async()
if process.platform is 'darwin'
cmd = 'script/set-version'
args = [grunt.config.get('atom.buildDir')]
spawn {cmd, args}, (error, result, code) -> done(error)
else if process.platform is 'win32'
shellAppDir = grunt.config.get('atom.shellAppDir')
shellExePath = path.join(shellAppDir, 'atom.exe')
cmd = 'git'
args = ['rev-parse', '--short', 'HEAD']
spawn {cmd, args}, (error, result, code) ->
return done(error) if error?
cmd = 'git'
args = ['rev-parse', '--short', 'HEAD']
spawn {cmd, args}, (error, result, code) ->
if error?
done(error)
else
version = result.stdout.trim()
strings =
CompanyName: 'GitHub, Inc.'
FileDescription: 'The hackable, collaborative editor of tomorrow!'
LegalCopyright: 'Copyright (C) 2013 GitHub, Inc. All rights reserved'
ProductName: 'Atom'
ProductVersion: version
version = result.stdout.trim()
appDir = grunt.config.get('atom.appDir')
rcedit = require('rcedit')
rcedit(shellExePath, {'version-string': strings}, done)
# Replace version field of package.json.
packageJsonPath = path.join(appDir, 'package.json')
packageJson = require(packageJsonPath)
packageJson.version = version
packageJsonString = JSON.stringify(packageJson, null, 2)
fs.writeFileSync(packageJsonPath, packageJsonString)
if process.platform is 'darwin'
cmd = 'script/set-version'
args = [grunt.config.get('atom.buildDir'), version]
spawn {cmd, args}, (error, result, code) -> done(error)
else if process.platform is 'win32'
shellAppDir = grunt.config.get('atom.shellAppDir')
shellExePath = path.join(shellAppDir, 'atom.exe')
strings =
CompanyName: 'GitHub, Inc.'
FileDescription: 'The hackable, collaborative editor of tomorrow!'
LegalCopyright: 'Copyright (C) 2013 GitHub, Inc. All rights reserved'
ProductName: 'Atom'
ProductVersion: version
rcedit = require('rcedit')
rcedit(shellExePath, {'version-string': strings}, done)