Skip to content

Commit

Permalink
ci: use bump-my-version instead of bumpversion
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniBodor committed Jun 24, 2024
1 parent 6ffa1a5 commit 1adb94a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 23 deletions.
17 changes: 0 additions & 17 deletions .bumpversion.cfg

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/release_github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ jobs:
- name: Bump version
id: bump
run: |
echo "-- install bumpversion"
python3 -m pip install bumpversion
echo "-- install bump-my-version"
python3 -m pip install bump-my-version
echo "-- merge release branch into main"
git switch test_protected_main
git merge ${{ github.event.inputs.release_branch }}
echo "-- bump the version"
bumpversion ${{ github.event.inputs.version_level }} --commit --tag
echo "-- push bumpversion"
bump-my-version bump ${{ github.event.inputs.version_level }} --commit --tag
echo "-- push bumped version"
echo "RELEASE_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
git push --tags -f
git push
Expand Down
2 changes: 1 addition & 1 deletion README.dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ NOTE: the current token (associated to @DaniBodor) allowing to bypass branch pro
1. Branch from `main` and prepare the branch for the release (e.g., removing the unnecessary files, fix minor bugs if necessary).
2. Ensure all tests pass `pytest -v` and that linting (`ruff check`) and formatting (`ruff format --check`) conventions
are adhered to.
3. Bump the version using [bumpversion](https://github.com/c4urself/bump2version): `bumpversion <level>`
3. Bump the version using [bump-my-version](https://github.com/callowayproject/bump-my-version): `bump-my-version bump <level>`
where level must be one of the following ([following semantic versioning conventions](https://semver.org/)):
- `major`: when API-incompatible changes have been made
- `minor`: when functionality was added in a backward compatible manner
Expand Down
28 changes: 27 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies = [
# development dependency groups
dev = [
"pytest >= 7.4.0",
"bump2version",
"bump-my-version",
"coverage",
"pycodestyle",
"pytest-cov",
Expand Down Expand Up @@ -165,3 +165,29 @@ isort.known-first-party = ["eitprocessing"]
"PLR2004", # Comparison against unnamed value
]
"docs/*" = ["ALL"]

[tool.bumpversion]
current_version = "1.0.2"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_version = false
tag = false
sign_tags = false
tag_name = "v{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
allow_dirty = false
commit = false
message = "Bump version: {current_version} → {new_version}"
commit_args = ""

[[tool.bumpversion.files]]
filename = "pyproject.toml"

[[tool.bumpversion.files]]
filename = "CITATION.cff"

[[tool.bumpversion.files]]
filename = "eitprocessing/__init__.py"

0 comments on commit 1adb94a

Please sign in to comment.