mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 10:17:11 +03:00
Add generate-asar task
This commit is contained in:
parent
2e10517e1c
commit
f9e80439d0
@ -223,7 +223,7 @@ module.exports = (grunt) ->
|
||||
|
||||
ciTasks = ['output-disk-space', 'download-atom-shell', 'download-atom-shell-chromedriver', 'build']
|
||||
ciTasks.push('dump-symbols') if process.platform isnt 'win32'
|
||||
ciTasks.push('set-version', 'check-licenses', 'lint')
|
||||
ciTasks.push('set-version', 'check-licenses', 'lint', 'generate-asar')
|
||||
ciTasks.push('mkdeb') if process.platform is 'linux'
|
||||
ciTasks.push('create-windows-installer') if process.platform is 'win32'
|
||||
ciTasks.push('test') if process.platform is 'darwin'
|
||||
@ -231,6 +231,6 @@ module.exports = (grunt) ->
|
||||
ciTasks.push('publish-build')
|
||||
grunt.registerTask('ci', ciTasks)
|
||||
|
||||
defaultTasks = ['download-atom-shell', 'download-atom-shell-chromedriver', 'build', 'set-version']
|
||||
defaultTasks = ['download-atom-shell', 'download-atom-shell-chromedriver', 'build', 'set-version', 'generate-asar']
|
||||
defaultTasks.push 'install' unless process.platform is 'linux'
|
||||
grunt.registerTask('default', defaultTasks)
|
||||
|
14
build/tasks/generate-asar-task.coffee
Normal file
14
build/tasks/generate-asar-task.coffee
Normal file
@ -0,0 +1,14 @@
|
||||
asar = require 'asar'
|
||||
path = require 'path'
|
||||
|
||||
module.exports = (grunt) ->
|
||||
{rm} = require('./task-helpers')(grunt)
|
||||
|
||||
grunt.registerTask 'generate-asar', 'Generate asar archive for the app', ->
|
||||
done = @async()
|
||||
|
||||
appDir = grunt.config.get('atom.appDir')
|
||||
asar.createPackage appDir, path.resolve(appDir, '..', 'app.asar'), (err) ->
|
||||
return done(err) if err?
|
||||
rm appDir
|
||||
done()
|
Loading…
Reference in New Issue
Block a user