diff --git a/.bumpversion.toml b/.bumpversion.toml index bccdda9..8acb0b1 100644 --- a/.bumpversion.toml +++ b/.bumpversion.toml @@ -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\\d+)\\.(?P\\d+)\\.(?P\\d+)\\-(?Prelease|build)\\.[0-9a-zA-Z-]+?" +# either YYYY.MM.MICRO or YYYY.MM.MICRO-build.date.COMMIT_SHA +parse = "(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)(?:\\-(?Prelease|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