Implement versioning of Python projects according to PEP 440

  • If commit is set to True , then every single bump of a project version will be created automatically a commit with a specific message.
  • tag is likewise commit
  • files is a list of project files that will be used for bump
  • Other stuff is used under the hood of the library, I won’t go into many details here, but you can parse & serialize a version string based on own needs, set dev, post-release etc.
X.Y.ZaN   # Alpha release
X.Y.ZbN # Beta release
X.Y.ZrcN # Release Candidate
X.Y.Z # Final release
bumpversion patch # 3.0.0.a0 → 3.0.1.a0
bumpversion n # 3.0.1.a0 → 3.0.1.a1
bumpversion release # 3.0.1.a1 → 3.0.1.b0
bumpversion release # 3.0.1.b0 → 3.0.1.rc0
bumpversion release # 3.0.1.rc0 → 3.0.1
bumpversion minor # 3.0.1 → 3.1.0.a0
bumpversion major # 3.1.0.a0 → 4.0.0.a0
bumpversion n # 4.0.0.a0 → 4.0.0.a1
bumpversion release --tag # 4.0.0.a1 → 4.0.0.b0

--

--

Software Engineer, LL.B., MSc in CS

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store