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

Added -target-release flag to control which component to bump if pre-release #31

Closed
wants to merge 0 commits into from

Conversation

yobeonline
Copy link
Contributor

Possible values are patch (default), minor and major.

  • Readme updated
  • Unit test added
  • Changelog partially updated (release date is not up to me)

Closes #29

details

I created the custom enum-like type TargetRelease to hold values for the new flag. I gave it the Value interface (methods String and Set) so that the flags package can deal with this type on its own.

The String method for TargetRelease panics if the integer value is not one of the enums. I don't know if it is good practice to do that (i am a golang beginner), I just felt there was no other way to deal with this case.

Using patch as default value preserves the previous behavior so that there should be no regression.

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.

Add flags to control which component should be bumped for prereleases.
1 participant