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

Use bumpversion #22

Merged
merged 7 commits into from Dec 22, 2020
Merged

Use bumpversion #22

merged 7 commits into from Dec 22, 2020

Conversation

Zeitsperre
Copy link
Collaborator

Bumpversion is a tool we use to get around the problem of tracking/updating versions between releases.

https://github.com/c4urself/bump2version

The API is quite simple: bumpversion major/minor/patch will increment the semver part that you are interested in advancing. I have ported a piece of configuration that allows one to set a version as "release-ready" as well. Bumping major will set minor and patch both to 0, minor will reset patch to 0. It's pretty no-nonsense.

I have disabled tagging and committing by bumpversion since it doesn't play very well with pre-commit and black sometimes, but the process of releasing/tagging is not complicated is not complicated:

In other words, to create a new tagged release:

$ bumpversion minor
$ git commit -m "bumped version to vX.Y+1.Z-beta"
$ bumpversion release
$ git commit -m "bumped version to vX.Y+1.Z"
$ git tag "vX.Y+1.Z"
$ git push (--tags)

@Zeitsperre Zeitsperre added the enhancement New feature or request label Dec 21, 2020
@Zeitsperre Zeitsperre self-assigned this Dec 21, 2020
Copy link
Collaborator

@cjauvin cjauvin left a comment

Choose a reason for hiding this comment

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

I like it, it's an excellent idea, thanks! So it's ready to go as is?

test = pytest

[tool:pytest]
collect_ignore = ['setup.py']
addopts = --verbose
filterwarnings =
filterwarnings =
Copy link
Collaborator

Choose a reason for hiding this comment

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

Your editor seems to be adding an extra space here? Mine is configured to remove it..

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh, it's a strange bug with bump2version. It's harmless so long as we don't commit on bump. c4urself/bump2version#124

@Zeitsperre Zeitsperre merged commit 0ed62b1 into master Dec 22, 2020
@Zeitsperre Zeitsperre deleted the use_bumpversion branch December 22, 2020 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants