bchr02 / node-pre-gyp-github

A node-pre-gyp module which provides the ability to publish to GitHub releases.
MIT License
52 stars 32 forks source link

Remote path support with {version} placeholder #12

Closed royaltm closed 8 years ago

royaltm commented 8 years ago

Another approach to #11.

Add support of remote_path with {version} placeholder as release tag names instead of tag names hardcoded into host.

This solution is backward compatible, so if no remote_path then use version as a release tag name.

To look for packages remote_path is appended to stage_dir if set.

Adds missing error message and configuration sanity checking.

I was fiddling around a little bit with github releases and can confirm that slashes "/" within remote_path are perfectly safe and work. The package gets uploaded, the tag name is created and you can access the binary by that path name.

Only git tag unsupported characters are not allowed. Github will nicely handle that throwing errors when publishing with --release. If publishing without --release the draft will be created but github will not allow you to publish with broken tag name.

bchr02 commented 8 years ago

@royaltm Good work! Just merged. Thank you.