Skip to content

Conversation

@noslouch
Copy link
Contributor

Most of the other S3 ember-cli-deploy plugins include a configuration to add prefix to files destined for an S3 bucket, e.g. to upload stuff to a nested path. This PR adds that config option, and a couple other items I noticed while digging around in the source.

  • log output. I added some log output for verbose mode. I found this helpful while adding this feature
  • _list regex. the regex in _list wasn't matching some revision keys due to including [^.]* in the pattern. ember-cli-deploy-revision-data uses version numbers and a commit hash by default in the form of #.#.#+<hash>, which means the literal . characters will fail the regex test. I changed the regex to match any character between archivePrefix and .zip. I think the fact that the pattern also includes .zip should ensure that it only matches zipped asset bundles.

@LevelbossMike
Copy link
Member

Hi @noslouch and thanks for adding this 👍 . Looks great! Can you please add tests for the changes you made? Happy to merge this in with tests.

@noslouch
Copy link
Contributor Author

can do!

@noslouch
Copy link
Contributor Author

noslouch commented Jan 25, 2018

hey @LevelbossMike! I added a couple assertions for uploading and activating. Let me know if that's ok, or if you'd also like to assert against revision fetching as well.

@LevelbossMike
Copy link
Member

@noslouch This looks very nice 🎉 Yes please also add a test that listing works as expected when using a prefix.

@noslouch
Copy link
Contributor Author

All righty. I had to tweak the signature of setupTestData so the revision tests would have something to find on S3 when it looked for files under the awsPrefix. Let me know if there's anything else! @LevelbossMike

@LevelbossMike LevelbossMike merged commit c0d9037 into ember-cli-deploy:master Jan 25, 2018
@LevelbossMike
Copy link
Member

cool! thx so much!

@noslouch
Copy link
Contributor Author

you're welcome! any chance you can cut a release today at some point?

@noslouch noslouch deleted the aws-prefix branch January 25, 2018 17:44
@noslouch noslouch restored the aws-prefix branch January 25, 2018 22:55
@LevelbossMike
Copy link
Member

@noslouch this is released now via 0.0.3

@noslouch
Copy link
Contributor Author

Excellent! Thanks so much!

@noslouch noslouch deleted the aws-prefix branch January 26, 2018 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants