diff --git a/.bumpversion.cfg b/.bumpversion.cfg deleted file mode 100644 index 3798f0a..0000000 --- a/.bumpversion.cfg +++ /dev/null @@ -1,35 +0,0 @@ -[bumpversion] -current_version = 1.2.0a1 -commit = False -tag = False -parse = (?P\d+) - \.(?P\d+) - \.(?P\d+) - ((?P[a-z]+) - ?(\.)? - (?P\d+))? -serialize = - {major}.{minor}.{patch}{prerelease}{num} - {major}.{minor}.{patch} - -[bumpversion:part:prerelease] -first_value = a -values = - a - b - rc - -[bumpversion:part:num] -first_value = 1 - -[bumpversion:file:dbt/adapters/mysql/__version__.py] -search = version = "{current_version}" -replace = version = "{new_version}" - -[bumpversion:file:dbt/adapters/mysql5/__version__.py] -search = version = "{current_version}" -replace = version = "{new_version}" - -[bumpversion:file:dbt/adapters/mariadb/__version__.py] -search = version = "{current_version}" -replace = version = "{new_version}" diff --git a/.bumpversion.toml b/.bumpversion.toml new file mode 100644 index 0000000..e09d8c3 --- /dev/null +++ b/.bumpversion.toml @@ -0,0 +1,56 @@ +[tool.bumpversion] +current_version = "1.2.0a1" +parse = ''' + (?P[\d]+) # major version number + \.(?P[\d]+) # minor version number + \.(?P[\d]+) # patch version number + (?P # optional pre-release - ex: a1, b2, rc25 + (?Pa|b|rc) # pre-release type + (?P[\d]+) # pre-release version number + )? + ( # optional nightly release indicator + \.(?Pdev[0-9]+) # ex: .dev02142023 + )? # expected matches: `1.15.0`, `1.5.0a11`, `1.5.0a1.dev123`, `1.5.0.dev123457`, expected failures: `1`, `1.5`, `1.5.2-a1`, `text1.5.0` +''' +serialize = [ + "{major}.{minor}.{patch}{prekind}{num}.{nightly}", + "{major}.{minor}.{patch}.{nightly}", + "{major}.{minor}.{patch}{prekind}{num}", + "{major}.{minor}.{patch}", +] +commit = false +tag = false + +[tool.bumpversion.parts.prekind] +first_value = "a" +optional_value = "final" +values = [ + "a", + "b", + "rc", + "final", +] + +[tool.bumpversion.parts.num] +first_value = "1" + +[[tool.bumpversion.files]] +filename = "setup.py" + +[[tool.bumpversion.files]] +filename = "dbt/adapters/mysql/__version__.py" + +[[tool.bumpversion.files]] +filename = "dbt/adapters/mysql5/__version__.py" + +[[tool.bumpversion.files]] +filename = "dbt/adapters/mariadb/__version__.py" + +[[tool.bumpversion.files]] +filename = "dev-requirements.txt" +parse = ''' + (?P[\d]+) # major version number + \.(?P[\d]+) # minor version number + .latest +''' +serialize = ["{major}.{minor}.latest"] diff --git a/RELEASE.md b/RELEASE.md index c423720..7500413 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -10,15 +10,15 @@ 1. Open a branch for the release - `git checkout -b releases/1.5.0` 1. Update [`CHANGELOG.md`](CHANGELOG.md) with the most recent changes -1. Bump the version using [`bump2version`](https://github.com/c4urself/bump2version/#bump2version): - 1. Dry run first by running `bumpversion --dry-run --verbose --new-version `. Some examples: +1. Bump the version using [`bump-my-version`](https://github.com/callowayproject/bump-my-version): + 1. Dry run first by running `bump-my-version bump --dry-run --verbose --new-version `. Some examples: - Release candidates: `--new-version 1.5.0rc1 num` - Alpha releases: `--new-version 1.5.0a1 num` - Patch releases: `--new-version 1.5.1 patch` - Minor releases: `--new-version 1.5.0 minor` - Major releases: `--new-version 2.0.0 major` - 1. Actually modify the files: `bumpversion --no-tag --new-version `. An example: - - Minor releases: `bumpversion --no-tag --new-version 1.5.0 minor` + 1. Actually modify the files: `bump-my-version bump --no-tag --new-version `. An example: + - Minor releases: `bump-my-version bump --no-tag --new-version 1.5.0 minor` 1. Check the diff with `git diff` 1. Add the files that were changed with `git add --update` 1. Commit with message `Release dbt-mysql v` @@ -60,7 +60,7 @@ PyPI recognizes [pre-release versioning conventions](https://packaging.python.or - `git pull` - `git checkout -b bump-1.6.0a1` - Minor releases: - `bumpversion --no-tag --new-version 1.6.0a1 num` + `bump-my-version bump --no-tag --new-version 1.6.0a1 num` - Update the branch names in `dev-requirements.txt` from `@{previous-version}.latest` to `@{minor-version}.latest` (or `@main`) - Commit with message `Bump dbt-mysql 1.6.0a1` - `git push` diff --git a/dev-requirements.txt b/dev-requirements.txt index bb4f4d8..75723b7 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,7 +1,7 @@ # install latest changes in dbt-core # TODO: how to automate switching from develop to version branches? -# git+https://github.com/dbt-labs/dbt-core.git@1.4.latest#egg=dbt-core&subdirectory=core -git+https://github.com/dbt-labs/dbt-core.git@1.4.latest#egg=dbt-tests-adapter&subdirectory=tests/adapter +git+https://github.com/dbt-labs/dbt-core.git@1.2.latest#egg=dbt-core&subdirectory=core +git+https://github.com/dbt-labs/dbt-core.git@1.2.latest#egg=dbt-tests-adapter&subdirectory=tests/adapter # if version 1.x or greater -> pin to major version # if version 0.x -> pin to minor diff --git a/setup.py b/setup.py index 7c67449..c176ec4 100644 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ def _get_dbt_core_version(): package_name = "dbt-mysql" -package_version = "1.4.0a1" +package_version = "1.2.0a1" dbt_core_version = _get_dbt_core_version() description = """The MySQL adapter plugin for dbt"""