Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Support no-bump option #28

Closed
perry-mitchell opened this issue Dec 20, 2018 · 8 comments
Closed

[Feature] Support no-bump option #28

perry-mitchell opened this issue Dec 20, 2018 · 8 comments

Comments

@perry-mitchell
Copy link

perry-mitchell commented Dec 20, 2018

I use this package in a lot of projects, and it's terribly convenient, but one item which is missing in my opinion is the ability to specify a no-bump option. Sometimes a deployment fails due to some network condition in one of our projects and we'd simply like to deploy the bumped version.. It'd be great if there were a flag for such an option within version-bump-prompt, such as --allow-no-bump or --opt-bypass, for example.

As version-bump-prompt is usually always the first step for me, having such a feature would mean that I wouldn't need to add another prompt before this one.

EDIT: I'd happily add this if it's something you'd be interested in.

@JamesMessinger
Copy link
Member

Thanks for the suggestion! I'm glad you find this tool useful.

I assume you're using the --prompt option, right? If so, then how about we just add another option to the prompt list to leave the version number the same. For example, the prompt might look like this:

Current version in package.json is 2.7.0
How would you like to bump it?
  major (3.0.0)
  minor (2.8.0)
> patch (2.7.1)
  pre-release major (3.0.0-beta.0)
  pre-release minor (2.8.0-beta.0)
  pre-release patch (2.7.1-beta.0)
  pre-release (2.7.1-beta.0)
  no version change (2.7.0)

Notice the no version change option at the end. Would that solve your need?

@perry-mitchell
Copy link
Author

That'd be amazing! It's exactly what I'm after, yes.

Would you want to do it or would you take a PR? I'm happy either way of course.

@JamesMessinger
Copy link
Member

I'd be happy to accept a PR! Thanks!

@JamesMessinger
Copy link
Member

Just to make sure we're on the same page... I don't think this requires any new command-line option (like --allow-no-bump or --opt-bypass). I think this is just an enhancement to the existing --prompt functionality

@JamesMessinger
Copy link
Member

@perry-mitchell - I was just looking at the code and noticed that this functionality already exists 🤦‍♂️

The --prompt option includes a custom... option that lets you specify whatever version number you want, and it defaults to the current version.

@perry-mitchell
Copy link
Author

perry-mitchell commented Dec 24, 2018

@JamesMessinger Good point! I saw this as well. I’m not sure that it’s super clear however, and having it as an option would mean less work in those workflows.

What’s your opinion in this regard?

@perry-mitchell
Copy link
Author

Maybe the custom item is enough for now. It's not super clear but seems to do the job. Thanks!

@JamesMessinger
Copy link
Member

@perry-mitchell - I'm currently working on a complete rewrite of version-bump-prompt. It's almost done, and it will include a "leave as-is" option in addition to the "custom" option. Expect to see it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants