ember-cli-deploy / ember-cli-deploy-s3

An ember-cli-deploy plugin to upload to s3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

manifest.txt should be uploaded as last

YoranBrondsema opened this issue · comments

manifest.txt can be left in an inconsistent state if a deploy is cancelled before all uploads have finished. The problem is that manifest.txt is correctly added to the end of the files to upload (see https://github.com/ember-cli-deploy/ember-cli-deploy-s3/blob/master/lib/s3.js#L81) but this order is not respected since all uploads are fired at the same time (see https://github.com/ember-cli-deploy/ember-cli-deploy-s3/blob/master/lib/s3.js#L32). So if a deploy is cancelled after manifest.txt has been uploaded but before all uploads have finished, the manifest will contain files that have actually not been uploaded. This breaks future deploys.

The solution will be to upload manifest.txt only after all uploads have been completed. I will try to come up with a PR by the end of this week.