-
Notifications
You must be signed in to change notification settings - Fork 1
/
.bumpversion.toml
47 lines (34 loc) · 1.44 KB
/
.bumpversion.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# how to use this?
# for releasing new version:
# bump-my-version bump micro <--no-tag> <--verbose> <-n>
# for manually setting the version:
# bump-my-version bump --new-version 2024.1.0
# for marking dev build:
# export SHORT_COMMIT_SHA=$(git rev-parse --short HEAD)
# bump-my-version bump dev
[tool.bumpversion]
current_version = "2024.1.0" # this is the single source of truth for the version
# do not create tags or commits by default
commit = false
tag = true
# allow to bump version even if there are uncommitted changes
allow_dirty = true
# parser
# either YYYY.MM.MICRO or YYYY.MM.MICRO-build.date.COMMIT_SHA
parse = "(?P<year>[0-9]+)\\.(?P<month>[0-9]+)\\.(?P<micro>[0-9]+)(?:\\-(?P<dev>release|build)\\.[0-9a-zA-Z-]+)?"
serialize = [
"{year}.{month}.{micro}-{dev}.{now:%Y/%m/%d-%H-%M}.{$SHORT_COMMIT_SHA}", # the serializer for dev builds; commit SHA is env variable;
# note that builds cannot be incremented!
# this is purely for covenience of building intermediate versions without actually bumping the version in the codebase
"{year}.{month}.{micro}" # serializer for actual releases
]
[tool.bumpversion.parts.dev]
# first value is optional and hence omitted from version output
# only build will appear in output if necessary
values = ["release", "build"]
[[tool.bumpversion.files]]
glob = "**/setup.py"
[[tool.bumpversion.files]]
filename = "CHANGELOG.md"
search = "Unreleased"
#TODO: might want to auto-update internal dependencies!