List files to be zipped explicitly, remove cleaning step.
This commit is contained in:
parent
167216631f
commit
9de7015e3e
@ -306,7 +306,6 @@ module.exports = (grunt) ->
|
|||||||
clean:
|
clean:
|
||||||
builds: 'builds'
|
builds: 'builds'
|
||||||
testbuilds: 'testbuilds'
|
testbuilds: 'testbuilds'
|
||||||
crx: 'testbuilds/crx<%= pkg.meta.suffix[pkg.channel] %>'
|
|
||||||
tmpcrx: ['tmp-crx', 'testbuilds/updates<%= pkg.meta.suffix.noupdate %>.xml']
|
tmpcrx: ['tmp-crx', 'testbuilds/updates<%= pkg.meta.suffix.noupdate %>.xml']
|
||||||
tmpuserscript: [
|
tmpuserscript: [
|
||||||
'tmp-userscript',
|
'tmp-userscript',
|
||||||
@ -379,7 +378,6 @@ module.exports = (grunt) ->
|
|||||||
]
|
]
|
||||||
|
|
||||||
grunt.registerTask 'build-crx-channel', [
|
grunt.registerTask 'build-crx-channel', [
|
||||||
'clean:crx'
|
|
||||||
'concat:crx'
|
'concat:crx'
|
||||||
'copy:crx'
|
'copy:crx'
|
||||||
'zip-crx'
|
'zip-crx'
|
||||||
@ -404,8 +402,8 @@ module.exports = (grunt) ->
|
|||||||
grunt.registerTask 'zip-crx', 'Pack CRX contents in ZIP file', ->
|
grunt.registerTask 'zip-crx', 'Pack CRX contents in ZIP file', ->
|
||||||
pkg = grunt.config 'pkg'
|
pkg = grunt.config 'pkg'
|
||||||
zip = new JSZip()
|
zip = new JSZip()
|
||||||
for file in grunt.file.expand "testbuilds/crx#{pkg.meta.suffix[pkg.channel]}/*"
|
for file in ['eventPage.js', 'icon128.png', 'icon16.png', 'icon48.png', 'manifest.json', 'script.js']
|
||||||
zip.file path.basename(file), grunt.file.read(file, {encoding: null}), {date: new Date(pkg.meta.date)}
|
zip.file file, grunt.file.read("testbuilds/crx#{pkg.meta.suffix[pkg.channel]}/#{file}", {encoding: null}), {date: new Date(pkg.meta.date)}
|
||||||
output = zip.generate
|
output = zip.generate
|
||||||
type: 'nodebuffer'
|
type: 'nodebuffer'
|
||||||
compression: 'DEFLATE'
|
compression: 'DEFLATE'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user