diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 30e7913f7..531b30c91 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,16 +1,26 @@ [bumpversion] current_version = 1.1.1 -parse = (?P\d+) - \.(?P\d+) - \.(?P\d+) - ((?Pa|b|rc)(?P\d+))? -serialize = - {major}.{minor}.{patch}{prerelease}{num} + +# `parse` allows parsing the version into the parts we need to check. There are some +# unnamed groups and that's okay because they do not need to be audited. If any part +# of the version passed and does not match the regex, it will fail. +# expected matches: `1.5.0`, `1.5.0a1`, `1.5.0a1.dev123457+nightly` +# excepted failures: `1`, `1.5`, `1.5.2-a1`, `text1.5.0` +parse = (?P[\d]+) # major version number + \.(?P[\d]+) # minor version number + \.(?P[\d]+) # patch version number + (((?Pa|b|rc) # optional pre-release type + ?(?P[\d]+?)) # optional pre-release version number + \.?(?P[a-z0-9]+\+[a-z]+)? # optional nightly release indicator + )? +serialize = + {major}.{minor}.{patch}{prekind}{num}.{nightly} + {major}.{minor}.{patch}{prekind}{num} {major}.{minor}.{patch} commit = False tag = False -[bumpversion:part:prerelease] +[bumpversion:part:prekind] first_value = a optional_value = final values = @@ -22,6 +32,8 @@ values = [bumpversion:part:num] first_value = 1 +[bumpversion:part:nightly] + [bumpversion:file:setup.py] [bumpversion:file:dbt/adapters/spark/__version__.py]