Skip to content

Commit f7f98ff

Browse files
Bump version, and ensure new versions always released
1 parent 7a8c0e3 commit f7f98ff

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,18 @@ jobs:
4747
fi
4848
echo "Versions match: $PYPROJECT_VERSION"
4949
50+
if [ "${{ github.event_name }}" = "pull_request" ]; then
51+
git fetch origin main --depth=1
52+
MAIN_VERSION=$(git show origin/main:pyproject.toml | grep '^version = ' | sed 's/version = "\(.*\)"/\1/' || true)
53+
if [ -z "$MAIN_VERSION" ]; then
54+
echo "::warning::Could not determine version on main, skipping version bump check"
55+
elif [ "$PYPROJECT_VERSION" = "$MAIN_VERSION" ]; then
56+
echo "::error::Version $PYPROJECT_VERSION is the same as on main. Please bump the version."
57+
echo "Run 'make bump VERSION=x.y.z' to update both files."
58+
exit 1
59+
fi
60+
fi
61+
5062
- name: Run tests
5163
run: poetry run pytest tests/ -v
5264

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "squawk-alembic"
7-
version = "0.3.0"
7+
version = "0.3.1"
88
description = "Pre-commit hook to lint Alembic migration SQL with squawk"
99
packages = [{include = "squawk_alembic"}]
1010
readme = "README.md"

squawk_alembic/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.3.0"
1+
__version__ = "0.3.1"

0 commit comments

Comments
 (0)