Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bump-my-version #171

Merged
merged 4 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .bumpversion.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[tool.bumpversion]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pip install bump-my-version
bump-my-version bump patch

current_version = "0.4.0"
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
ignore_missing_files = 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 = ""
setup_hooks = []
pre_commit_hooks = []
post_commit_hooks = []

[[tool.bumpversion.files]]
filename = "CMakeLists.txt"
parse = "(?P<major>\\d+) (?P<minor>\\d+) (?P<patch>\\d+)"
serialize = ["{major} {minor} {patch}"]
search = "make_version(GHEX {current_version})"
replace = "make_version(GHEX {new_version})"

[[tool.bumpversion.files]]
filename = "bindings/python/pyproject.toml"
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ set(GHEX_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
list(APPEND CMAKE_MODULE_PATH "${GHEX_MODULE_PATH}")

include(ghex_version)
# note: version should not be changed manually, use bump-my-version instead:
# install: pip install bump-my-version
# example: bump-my-version bump patch
make_version(GHEX 0 4 0)

project(GHEX VERSION ${GHEX_VERSION} LANGUAGES C CXX)
Expand Down
5 changes: 4 additions & 1 deletion bindings/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ requires = [
dependencies = ['mpi4py>=3.1', 'numpy>=1.21']
description = 'Generic Halo Exchanges: Python API'
name = 'ghex'
version = '0.4.0' # needs to be adapted
# note: version should not be changed manually, use bump-my-version instead:
# install: pip install bump-my-version
# example: bump-my-version bump patch
version = '0.4.0'
havogt marked this conversation as resolved.
Show resolved Hide resolved
# note(stubbiali): the following fields are temporarily commented out since both LICENSE and README
# files live in a parent directory
# license = {file = '../../LICENSE'}
Expand Down
Loading