Skip to content

Commit eb9bec3

Browse files
bum up version with check.
1 parent 5f83973 commit eb9bec3

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,32 @@ jobs:
2929
virtualenvs-create: true
3030
virtualenvs-in-project: true
3131

32-
- name: Check tag matches pyproject.toml version
32+
- name: Check tag matches version files
3333
run: |
3434
TAG_VERSION="${GITHUB_REF##*/}"
3535
TAG_VERSION_NO_PREFIX="${TAG_VERSION#v}"
3636
echo "Tag version: $TAG_VERSION (stripped: $TAG_VERSION_NO_PREFIX)"
37+
3738
PYPROJECT_VERSION=$(grep '^version =' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
3839
echo "pyproject.toml version: $PYPROJECT_VERSION"
40+
41+
INIT_VERSION=$(grep '^__version__ =' pythonanywhere_core/__init__.py | sed 's/__version__ = "\(.*\)"/\1/')
42+
echo "__init__.py version: $INIT_VERSION"
43+
3944
if [ "$TAG_VERSION_NO_PREFIX" != "$PYPROJECT_VERSION" ]; then
4045
echo "Tag version ($TAG_VERSION_NO_PREFIX) does not match pyproject.toml version ($PYPROJECT_VERSION)" >&2
4146
exit 1
4247
fi
48+
49+
if [ "$TAG_VERSION_NO_PREFIX" != "$INIT_VERSION" ]; then
50+
echo "Tag version ($TAG_VERSION_NO_PREFIX) does not match __init__.py version ($INIT_VERSION)" >&2
51+
exit 1
52+
fi
53+
54+
if [ "$PYPROJECT_VERSION" != "$INIT_VERSION" ]; then
55+
echo "pyproject.toml version ($PYPROJECT_VERSION) does not match __init__.py version ($INIT_VERSION)" >&2
56+
exit 1
57+
fi
4358
shell: bash
4459

4560
- name: Cache Poetry dependencies

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "pythonanywhere-core"
3-
version = "0.2.5"
3+
version = "0.2.6"
44
description = "API wrapper for programmatic management of PythonAnywhere services."
55
authors = ["PythonAnywhere <[email protected]>"]
66
license = "MIT"

pythonanywhere_core/__init__.py

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

0 commit comments

Comments
 (0)