From: Jason Woofenden Date: Wed, 13 Feb 2013 17:19:11 +0000 (-0500) Subject: work around server bug to fix publish_seamless X-Git-Url: https://jasonwoof.com/gitweb/?p=af-coffee.git;a=commitdiff_plain;h=3a8d93b745943367320bb0e738e9cc0b230fe0a1 work around server bug to fix publish_seamless --- diff --git a/client.coffee b/client.coffee index 9e28b9b..b395605 100755 --- a/client.coffee +++ b/client.coffee @@ -59,12 +59,20 @@ commands.app_publish_seamless = (token, app_name, zip_file, callback) -> # if not, drop new_info's dependency on push old_info: (cb) => @api 'app_info', old_app, cb new_info: ['push', (cb) => @api 'app_info', new_app, cb ] - start_new: ['push', 'old_info', 'new_info', (cb, args) => - args.new_info.state = 'STARTED' + copy_uris: ['push', 'old_info', 'new_info', (cb, args) => + # There's a bug in the server where you can't set new uris and + # start the app in the same app_set_info call for u in args.old_info.uris args.new_info.uris.push u unless u.substr(-6) is '.af.cm' @api 'app_set_info', new_app, args.new_info, cb ] + new_info_again: ['copy_uris', (cb, args) => + @api 'app_info', new_app, cb + ] + start_new: ['new_info_again', (cb, args) => + args.new_info_again.state = 'STARTED' + @api 'app_set_info', new_app, args.new_info_again, cb + ] hide_old: ['start_new', 'old_info', (cb, args) => just_af = [] for u in args.old_info.uris