Skip to content

Commit 37bb07f

Browse files
committed
add version bump script
1 parent a35542f commit 37bb07f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.github/scripts/bump-version.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
set -eu
3+
4+
CURRENT_VERSION=$(python setup.py --version)
5+
sed -i "s/__version__ = \"${CURRENT_VERSION}\"/__version__ = \"$1\"/" django_mongodb/__init__.py

.github/workflows/release-python.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
id: pre-publish
5050
with:
5151
version: ${{ inputs.version }}
52+
version_bump_script: ./.github/scripts/bump-version.sh
5253
dry_run: ${{ inputs.dry_run }}
5354

5455
build-dist:
@@ -90,6 +91,7 @@ jobs:
9091
product_name: ${{ env.PRODUCT_NAME }}
9192
silk_asset_group: ${{ env.SILK_ASSET_GROUP }}
9293
evergreen_project: ${{ env.EVERGREEN_PROJECT }}
94+
version_bump_script: ./.github/scripts/bump-version.sh
9395
token: ${{ github.token }}
9496
repository_url: https://test.pypi.org/legacy/
9597
dry_run: ${{ inputs.dry_run }}

0 commit comments

Comments
 (0)