Skip to content

Conversation

piotrdubiel
Copy link
Contributor

S3 options can now contain macros to allow something like this:

"publish": {
    "provider": "s3",
    "bucket": "some-bucket",
    "path": "${os}/${env.SOME_ENV}"
}

Now bucket, path and channel can contain macros. Previously these options couldn't be configured with macros.

@mention-bot
Copy link

@piotrdubiel, thanks for your PR! By analyzing the history of the files in this pull request, we identified @Anmo and @arekkas to be potential reviewers.

@develar
Copy link
Member

develar commented Mar 10, 2017

Resolving in this place is ok, because in any case result is not cached — to be able to specify publish config per target. Anyway, arch is not used currently.

}

function expandPublishConfig(packager: PlatformPackager<any>, publishConfig: PublishConfiguration) {
if ((<S3Options>publishConfig).bucket != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just expand macro for all keys in the object. It also will allow us to remove explicit expand for generic URL (see usages in this file). Could you please do it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. One question: is it ok not to add arch in computeDownloadUrl to expand?

Copy link
Contributor Author

@piotrdubiel piotrdubiel Mar 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too soon, need to fix, because for some reason tests are failing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only snap test should be failed (unrelated).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fixed.

@piotrdubiel piotrdubiel force-pushed the feature/allow_file_macros_in_s3_options branch from becec9c to 72886fc Compare March 10, 2017 20:28
S3 options can now contain macros to allow something like this:
```
"publish": {
    "provider": "s3",
    "bucket": "some-bucket",
    "path": "${os}/${env.SOME_ENV}"
}
```
Now `bucket`, `path` and `channel` can contain macros. Previously these options couldn't be configured with macros.
@piotrdubiel piotrdubiel force-pushed the feature/allow_file_macros_in_s3_options branch from 72886fc to b36e6a3 Compare March 10, 2017 21:06
@develar develar merged commit 24fdf1d into electron-userland:master Mar 11, 2017
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.

3 participants