Skip to content

Commit

Permalink
scheme implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
tlpss committed Jan 8, 2024
1 parent 6f1074e commit 71b4b75
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .bumpversion.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
[tool.bumpversion]
current_version = "0.0.3"
current_version = "0.0.1" # this is the single source of truth for the version

# do not create tags or commits by default
commit = false
tag = false
# allow to bump version even if there are uncommitted changes
allow_dirty = true


# parser
parse = "(?P<year>\\d+)\\.(?P<month>\\d+)\\.(?P<id>\\d+)\\-(?P<dev>release|build)\\.[0-9a-zA-Z-]+?"
# either YYYY.MM.MICRO or YYYY.MM.MICRO-build.date.COMMIT_SHA
parse = "(?P<year>\\d+)\\.(?P<month>\\d+)\\.(?P<micro>\\d+)(?:\\-(?P<dev>release|build)\\.[0-9a-zA-Z-]+)?"


serialize = [
"{year}.{month}.{id}-{dev}.{$SHORT_COMMIT_SHA}", # commit SHA is env variable
"{year}.{month}.{id}"
"{year}.{month}.{micro}-{dev}.{now:%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
Expand Down

0 comments on commit 71b4b75

Please sign in to comment.