root: fix deploy bugs when running all the tasks at once

This commit is contained in:
Brian Mann
2017-09-01 02:22:35 -04:00
parent 73fa4a75a9
commit 2050630b1f
+9 -6
View File
@@ -119,9 +119,10 @@ deploy = {
build: (options) ->
console.log('#build')
if !options then options = @parseOptions(process.argv)
options ?= @parseOptions(process.argv)
askMissingOptions(['version', 'platform'])(options)
.then () ->
.then ->
build(options.platform, options.version, options)
zip: (options) ->
@@ -159,11 +160,13 @@ deploy = {
# - upload
deploy: ->
options = @parseOptions(process.argv)
askMissingOptions(['version', 'platform'])(options)
.then(build)
.then(() => @zip(options))
# assumes options.zip contains the zipped filename
.then(upload)
.then (options) =>
@build(options)
.then => @zip(options)
# assumes options.zip contains the zipped filename
.then => @upload(options)
}
module.exports = _.bindAll(deploy, _.functions(deploy))