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 to dev dependencies #529

Merged
merged 1 commit into from
Feb 24, 2025
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
6 changes: 2 additions & 4 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ search = :Version: {current_version}
replace = :Version: {new_version}

[bumpversion:file:package.json]
search = "version": "{current_version}",
replace = "version": "{new_version}",

[bumpversion:file:src/objects/conf/api.py]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@annashamray I think this was incorrectly part of bumpversion.cfg, it includes the API version which I think are separate from the version of the software, right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's not an easy question actually. Maybe we need to discuss it with @joeribekker
When we supported v1 and v2 of API at the same time we had Objects software version == Objects API v2 version

Now we dropped v1 of the API and released v3 of software and they started to deviate from each other.
I personally don't like it. Objects API is mostly an Restful API with a little bit of admin interface, so it doesn't make a lot of sense to have separate versions. Moreover unlike OZ we don't have any standard to adhere to.
I think having one version would be less confusing and more convenient for both developers and clients

But it's up to discussion

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Let's discuss it when Joeri is back indeed

search = "version": "{current_version}"
replace = "version": "{new_version}"

[bumpversion:file:src/objects/__init__.py]

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/prepare-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ projects: ["maykinmedia/15"]
- [ ] Version bump
- [ ] Regenerate API spec
- [ ] Update READMEs with release dates + links
- [ ] Bump version number with `bumpversion <major|minor|patch>` or `bump-my-version bump <major|minor|patch>`
- [ ] Bump version number with `bin/bump-my-version.sh bump <major|minor|patch>`
- [ ] Update changelog
25 changes: 25 additions & 0 deletions bin/bump-my-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
#
# Script to bump the version. Arguments are forwarded to bump-my-version.
#
# Usage:
#
# ./bin/bumpversion.sh bump minor|patch|pre|build
#

set -eu -o pipefail

toplevel=$(git rev-parse --show-toplevel)
cd $toplevel

# Ensure a virtualenv is active.
if [ -z $VIRTUAL_ENV ]; then
echo "VIRTUAL_ENV envvar is not set, you must activate your virtualenv before running this script."
exit 1
fi

# Forward all arguments to bump-my-version binary
bump-my-version "$@"

# Run npm install to update the package-lock.json version number
npm i
2 changes: 1 addition & 1 deletion requirements/dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Helpers
pip-tools
bumpversion
bump-my-version

# Debug tooling
django-debug-toolbar
Expand Down
44 changes: 41 additions & 3 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ annotated-types==0.7.0
# -c requirements/ci.txt
# -r requirements/ci.txt
# pydantic
anyio==4.8.0
# via httpx
ape-pie==0.2.0
# via
# -c requirements/ci.txt
Expand Down Expand Up @@ -70,11 +72,11 @@ boltons==21.0.0
# -r requirements/ci.txt
# face
# glom
bracex==2.5.post1
# via wcmatch
build==1.0.3
# via pip-tools
bump2version==1.0.1
# via bumpversion
bumpversion==0.6.0
bump-my-version==0.32.1
# via -r requirements/dev.in
cbor2==5.6.2
# via
Expand All @@ -94,6 +96,8 @@ certifi==2024.7.4
# -r requirements/ci.txt
# django-simple-certmanager
# elastic-apm
# httpcore
# httpx
# requests
# sentry-sdk
cffi==1.16.0
Expand All @@ -111,11 +115,13 @@ click==8.1.7
# -c requirements/ci.txt
# -r requirements/ci.txt
# black
# bump-my-version
# celery
# click-didyoumean
# click-plugins
# click-repl
# pip-tools
# rich-click
click-didyoumean==0.3.0
# via
# -c requirements/ci.txt
Expand Down Expand Up @@ -447,6 +453,12 @@ glom==23.5.0
# -c requirements/ci.txt
# -r requirements/ci.txt
# mozilla-django-oidc-db
h11==0.14.0
# via httpcore
httpcore==1.0.7
# via httpx
httpx==0.28.1
# via bump-my-version
humanize==4.9.0
# via
# -c requirements/ci.txt
Expand All @@ -456,6 +468,8 @@ idna==3.7
# via
# -c requirements/ci.txt
# -r requirements/ci.txt
# anyio
# httpx
# requests
# yarl
imagesize==1.4.1
Expand Down Expand Up @@ -519,6 +533,8 @@ lxml==4.9.4
# -c requirements/ci.txt
# -r requirements/ci.txt
# pyquery
markdown-it-py==3.0.0
# via rich
markupsafe==2.1.3
# via
# -c requirements/ci.txt
Expand All @@ -534,6 +550,8 @@ mccabe==0.7.0
# -c requirements/ci.txt
# -r requirements/ci.txt
# flake8
mdurl==0.1.2
# via markdown-it-py
mozilla-django-oidc==4.0.0
# via
# -c requirements/ci.txt
Expand Down Expand Up @@ -616,6 +634,7 @@ prompt-toolkit==3.0.43
# -c requirements/ci.txt
# -r requirements/ci.txt
# click-repl
# questionary
psycopg2==2.9.9
# via
# -c requirements/ci.txt
Expand All @@ -635,6 +654,7 @@ pydantic==2.9.2
# via
# -c requirements/ci.txt
# -r requirements/ci.txt
# bump-my-version
# django-setup-configuration
# pydantic-settings
pydantic-core==2.23.4
Expand All @@ -646,6 +666,7 @@ pydantic-settings==2.6.1
# via
# -c requirements/ci.txt
# -r requirements/ci.txt
# bump-my-version
# django-setup-configuration
pyflakes==3.2.0
# via
Expand All @@ -656,6 +677,7 @@ pygments==2.18.0
# via
# -c requirements/ci.txt
# -r requirements/ci.txt
# rich
# sphinx
# sphinx-tabs
pyjwt==2.4.0
Expand Down Expand Up @@ -727,6 +749,8 @@ qrcode==6.1
# -c requirements/ci.txt
# -r requirements/ci.txt
# django-two-factor-auth
questionary==2.1.0
# via bump-my-version
recommonmark==0.7.1
# via
# -c requirements/ci.txt
Expand Down Expand Up @@ -756,6 +780,12 @@ requests-mock==1.12.1
# -c requirements/ci.txt
# -r requirements/ci.txt
# commonground-api-common
rich==13.9.4
# via
# bump-my-version
# rich-click
rich-click==1.8.5
# via bump-my-version
sentry-sdk==2.12.0
# via
# -c requirements/ci.txt
Expand All @@ -778,6 +808,8 @@ six==1.16.0
# python-dateutil
# qrcode
# webtest
sniffio==1.3.1
# via anyio
snowballstemmer==2.2.0
# via
# -c requirements/ci.txt
Expand Down Expand Up @@ -857,6 +889,8 @@ text-unidecode==1.3
# -c requirements/ci.txt
# -r requirements/ci.txt
# faker
tomlkit==0.13.2
# via bump-my-version
tornado==6.4.2
# via
# -c requirements/ci.txt
Expand All @@ -866,9 +900,11 @@ typing-extensions==4.9.0
# via
# -c requirements/ci.txt
# -r requirements/ci.txt
# anyio
# mozilla-django-oidc-db
# pydantic
# pydantic-core
# rich-click
# zgw-consumers
tzdata==2024.1
# via
Expand Down Expand Up @@ -910,6 +946,8 @@ waitress==3.0.1
# -c requirements/ci.txt
# -r requirements/ci.txt
# webtest
wcmatch==10.0
# via bump-my-version
wcwidth==0.2.13
# via
# -c requirements/ci.txt
Expand Down
Loading