Skip to content

Instantly share code, notes, and snippets.

@wshayes
Last active May 8, 2020 19:58
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save wshayes/bc48cc3fa3474508452cba86949eb7d8 to your computer and use it in GitHub Desktop.
Save wshayes/bc48cc3fa3474508452cba86949eb7d8 to your computer and use it in GitHub Desktop.
Bumpversion configuration
[bumpversion]
current_version = 0.0.0
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
serialize =
{major}.{minor}.{patch}-{release}{build}
{major}.{minor}.{patch}
[bumpversion:part:release]
optional_value = prod
first_value = dev
values =
dev
prod
[bumpversion:part:build]
[bumpversion:file:VERSION]
[bumpversion:file:./api/__version__.py]
[bumpversion:file:./api/swagger.yaml]
search = version: {current_version}
replace = {new_version}
@wshayes
Copy link
Author

wshayes commented Aug 24, 2018

Example commands
$ cat VERSION
0.0.0

$ bumpversion major; cat VERSION
1.0.0-dev0

$ bumpversion minor; cat VERSION
1.1.0-dev0

$ bumpversion patch; cat VERSION
1.1.1-dev0

$ bumpversion build; cat VERSION
1.1.1-dev1

$ bumpversion build; cat VERSION
1.1.1-dev2

$ bumpversion release; cat VERSION
1.1.1

$ bumpversion minor; cat VERSION
1.2.0-dev0

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