Skip to content
This repository has been archived by the owner on Feb 14, 2018. It is now read-only.

Commit

Permalink
Change to use build-atom-shell
Browse files Browse the repository at this point in the history
 Build custom compile of atom-shell instead of download and add codesigning
  • Loading branch information
gmr committed Feb 12, 2015
1 parent d729f0b commit 4694abd
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
23 changes: 17 additions & 6 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
os = require 'os'
path = require 'path'

gruntFunction = (grunt) ->

pkg = grunt.file.readJSON 'package.json'

buildDir = path.join(os.tmpdir(), 'vessel-build')

binDir = 'binaries/Vessel.app'
contentsDir = "#{binDir}/Contents"
resourcesDir = "#{contentsDir}/Resources"
Expand All @@ -10,7 +17,7 @@ gruntFunction = (grunt) ->

grunt.initConfig

pkg: grunt.file.readJSON 'package.json'
pkg: pkg

checkDependencies:
this: {}
Expand Down Expand Up @@ -65,9 +72,12 @@ gruntFunction = (grunt) ->
{expand: true, src: 'resources/vessel.css', dest: cssDir, flatten: true, filter: 'isFile'}
]

'download-atom-shell':
version: '0.21.2'
outputDir: '.atom-shell'
'build-atom-shell':
tag: 'v0.21.2'
targetDir: './binaries'
buildDir: buildDir,
projectName: 'vessel'
productName: 'Vessel'

less:
development:
Expand Down Expand Up @@ -140,16 +150,17 @@ gruntFunction = (grunt) ->
grunt.loadNpmTasks 'grunt-contrib-less'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-dev-update'
grunt.loadNpmTasks 'grunt-download-atom-shell'
grunt.loadNpmTasks 'grunt-build-atom-shell'
grunt.loadNpmTasks 'grunt-npm-install'
grunt.loadNpmTasks 'grunt-shell-spawn'
grunt.loadNpmTasks 'grunt-template'

grunt.registerTask 'default', ['compile']
grunt.registerTask 'setup', ['checkDependencies', 'devUpdate', 'download-atom-shell','shell:prep']
grunt.registerTask 'setup', ['checkDependencies', 'devUpdate', 'build-atom-shell', 'prep']
grunt.registerTask 'lint', ['coffeelint:app']
grunt.registerTask 'compile', ['lint', 'coffee', 'less', 'template', 'copy']
grunt.registerTask 'build', ['setup', 'compile', 'shell:dist']
grunt.registerTask 'dist', ['compile', 'shell:dist']
grunt.registerTask 'run', ['shell:run']

module.exports = gruntFunction
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"grunt-contrib-less": "0.11.4",
"grunt-contrib-watch": "0.6.1",
"grunt-dev-update": "0.9.0",
"grunt-download-atom-shell": "0.8.2",
"grunt-build-atom-shell": "1.1.5",
"grunt-lesslint": "1.1.12",
"grunt-markdown": "0.6.1",
"grunt-mkdir": "0.1.2",
Expand Down
4 changes: 4 additions & 0 deletions scripts/dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ echo "Installing dependencies"
cd binaries/Vessel.app/Contents/Resources/app
npm install --production -q . 1> /dev/null 2> /dev/null

echo "Codesign"
cd $CPATH/binaries
codesign --deep --force --verbose --sign '3rd Party Mac Developer Application: AWeber Systems' Vessel.app

cd $CPATH/binaries
if [ -e "$ZIPFILE" ]
then
Expand Down
11 changes: 1 addition & 10 deletions scripts/prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,11 @@ echo "Removing previous Vessel.app if it exists"
rm -rf binaries
mkdir binaries

echo "Extracting Atom-Shell to binaries dir"
cp -R .atom-shell/Atom.app binaries/.

echo "Move Atom.app to Vessel.app"
mv binaries/Atom.app binaries/Vessel.app

echo "Renaming Atom to Vessel"
mv binaries/Vessel.app/Contents/MacOS/Atom binaries/Vessel.app/Contents/MacOS/Vessel

echo "Removing Atom Icon"
rm ./binaries/Vessel.app/Contents/Resources/atom.icns

echo "Making app dir"
mkdir -p ./binaries/Vessel.app/Contents/Resources/app

echo "Removing dependency logfile"
#echo "Removing dependency logfile"
rm -f node_modules/moment/sauce_connect.log

0 comments on commit 4694abd

Please sign in to comment.