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

Move from bump2version to bump-my-version #315

Merged
merged 1 commit into from
Nov 8, 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
21 changes: 0 additions & 21 deletions .bumpversion.cfg

This file was deleted.

1 change: 0 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* @robambalu @AdamGlustein @svatasoiu @alexddobkin

# Packaging code
.bumpversion.cfg @robambalu @AdamGlustein @svatasoiu @alexddobkin @ptomecek @timkpaine
conda @robambalu @AdamGlustein @svatasoiu @alexddobkin @ptomecek @timkpaine
CMakeLists.txt @robambalu @AdamGlustein @svatasoiu @alexddobkin @ptomecek @timkpaine
Makefile @robambalu @AdamGlustein @svatasoiu @alexddobkin @ptomecek @timkpaine
Expand Down
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,13 @@ updates:
directory: "/"
schedule:
interval: "weekly"
labels:
- "part: github_actions"

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "monthly"
labels:
- "lang: python"
- "part: dependencies"
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,16 @@ dockerdown: ## spin up docker compose services for adapter testing
.PHONY: show-version patch minor major

show-version:
@ bump2version --dry-run --allow-dirty pyproject.toml --list | grep current | awk -F= '{print $$2}'
@ bump-my-version show current_version

patch:
bump2version patch
bump-my-version bump patch

minor:
bump2version minor
bump-my-version bump minor

major:
bump2version major
bump-my-version bump major

########
# DIST #
Expand Down
2 changes: 1 addition & 1 deletion conda/dev-environment-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
dependencies:
- bison
- brotli
- bump2version>=1
- bump-my-version
- cmake
- codespell>=2.2.6,<2.3
- compilers
Expand Down
2 changes: 1 addition & 1 deletion conda/dev-environment-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- nodefaults
dependencies:
- brotli
- bump2version>=1
- bump-my-version
- cmake
- codespell>=2.2.6,<2.3
- compilers
Expand Down
8 changes: 4 additions & 4 deletions docs/wiki/dev-guides/Release-Process.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ your users.
### Preparing and tagging a release

Follow these steps when it's time to tag a new release. Before doing
this, you will need to ensure `bump2version` is installed into your
this, you will need to ensure `bump-my-version` is installed into your
development environment.

> \[!NOTE\]
Expand All @@ -89,7 +89,7 @@ development environment.
```

1. Make a branch and update version numbers in your local clone using
the `bump2version` integration in the Makefile.
the `bump-my-version` integration in the Makefile.

First, make a branch that will be pushed to the main `csp`
repository. Using a name like `release/v0.3.4` should avoid any
Expand All @@ -99,7 +99,7 @@ development environment.
git checkout -b release/v0.x.x
```

You can update the version number in the codebase using `bump2version`. For a
You can update the version number in the codebase using `bump-my-version`. For a
bugfix release, you would do:

```bash
Expand Down Expand Up @@ -127,7 +127,7 @@ development environment.

1. Tag the release

Use the version number `bump2version` generated and make sure the
Use the version number `bump-my-version` generated and make sure the
tag name begins with a `v`.

```bash
Expand Down
28 changes: 27 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Tracker = "https://github.com/point72/csp/issues"
[project.optional-dependencies]
develop = [
# build/dist
"bump2version>=1.0.0",
"bump-my-version",
"build",
"ruamel.yaml",
"scikit-build",
Expand Down Expand Up @@ -115,6 +115,32 @@ slack = [
"csp-adapter-slack",
]

[tool.bumpversion]
current_version = "0.0.5"
commit = false
tag = false
commit_args = "-s"

[[tool.bumpversion.files]]
filename = "csp/__init__.py"
search = '__version__ = "{current_version}"'
replace = '__version__ = "{new_version}"'

[[tool.bumpversion.files]]
filename = "setup.py"
search = 'version="{current_version}"'
replace = 'version="{new_version}"'

[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'

[[tool.bumpversion.files]]
filename = "CMakeLists.txt"
search = 'project(csp VERSION "{current_version}")'
replace = 'project(csp VERSION "{new_version}")'

[tool.check-manifest]
ignore = []

Expand Down
Loading