rondale-sc / ember-publisher

8 stars 2 forks source link

Use wildcard branch to ensure ember auto publishes tagOnly branches #3

Closed rondale-sc closed 10 years ago

rondale-sc commented 10 years ago

This should be extensible enough to re-use if necessary

@rjackson What do you think?

[finishes #2]

rwjblue commented 10 years ago

What happens when we have a branch named pr/1234, but that is not a tag? Seems like when a wildcard is setup this random branch will be published to the wildcard URL. Am I misunderstanding the implementation?

rondale-sc commented 10 years ago

@rjackson the guard around the adding of the tag urls to wildcard array should protect against this.

https://github.com/rondale-sc/ember-publisher/pull/3/files#diff-bbd2b1c89c76e6f62285da7bdc79fa3bR42

rwjblue commented 10 years ago

That guard would only prevent it from uploading to the "tags/" + tag + fullName path, but it would still attempt to upload to the wildcard url, right?

rwjblue commented 10 years ago

In the PR case, we would not have S3 credentials so we don't have to worry too much about that, but what about when a push is done to a branch that is not master, beta, stable (like the metal-views branch)?

rondale-sc commented 10 years ago

The wildcard is just an empty array. So https://github.com/rondale-sc/ember-publisher/blob/master/index.js#L82 localDests would be an empty array which means nothing would be uploaded. (or rather this triggers)

rwjblue commented 10 years ago

Perfect, thanks for walking me through that. In retrospect it is obvious.

Might want to update the README also?

rondale-sc commented 10 years ago

Yeah, definitely. And I'll bump the version. :)) Right after lunch