Skip to content

Add ability to publish using 'npm version'#263

Merged
joaomoreno merged 1 commit intomicrosoft:masterfrom
JimiC:publish-using-npm-version
Jun 4, 2018
Merged

Add ability to publish using 'npm version'#263
joaomoreno merged 1 commit intomicrosoft:masterfrom
JimiC:publish-using-npm-version

Conversation

@JimiC
Copy link
Contributor

@JimiC JimiC commented Jun 2, 2018

Resolves #206
References #180

As per popular request vsce publish <version> will now use npm version <version>, in order to bump the package version. In the process, package-lock.json will also be updated (when using npm5+) and tagged git commit will be done (supporting gpg signing when it's set in git config).

Note: As before only major, minor and patch are supported as a valid <version>.

I refrained from implementing a rollback of the process, as if anything goes wrong after the version bump (i.e. network issues), the user can simply execute vsce publish (without <version>) and complete the publishing.

This implementation also does not interfere with using plain vsce publish via a CI service. The user, in that case, should perform npm version <version> locally. Then push the commit and the tag. The CI publishing stage should only call vsce publish -p <token>.

@joaomoreno joaomoreno added this to the Backlog milestone Jun 4, 2018
@joaomoreno joaomoreno self-assigned this Jun 4, 2018
@joaomoreno joaomoreno merged commit 8ad048a into microsoft:master Jun 4, 2018
@joaomoreno
Copy link
Member

Works great for me!

@joaomoreno joaomoreno modified the milestones: Backlog, June 2018 Jul 2, 2018
@JimiC JimiC deleted the publish-using-npm-version branch July 2, 2018 14:25
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