Skip to content

Commit b15c97c

Browse files
committed
fix(ci): read pyproject version with tomllib; normalize *.toml to LF
1 parent 34bca56 commit b15c97c

3 files changed

Lines changed: 42 additions & 38 deletions

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@
1414
*.sh text eol=lf
1515
*.yml text eol=lf
1616
*.yaml text eol=lf
17+
*.toml text eol=lf
1718
Makefile text eol=lf

.github/workflows/release.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ jobs:
2121
pip install build twine
2222
- name: Verify tag matches pyproject version
2323
run: |
24+
set -euo pipefail
2425
TAG="${GITHUB_REF#refs/tags/v}"
25-
PYPROJECT=$(grep '^version' pyproject.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
26-
if [ "$TAG" != "$PYPROJECT" ]; then
27-
echo "Tag v$TAG does not match pyproject.toml version $PYPROJECT"
26+
TAG="${TAG//$'\r'/}"
27+
# Read [project].version with tomllib (stdlib on 3.11+). Avoids CRLF / grep picking the wrong line.
28+
VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
29+
if [ "$TAG" != "$VERSION" ]; then
30+
echo "Tag v$TAG does not match pyproject.toml [project] version $VERSION"
2831
exit 1
2932
fi
3033
- name: Build

pyproject.toml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
[build-system]
2-
requires = ["setuptools>=68", "wheel"]
3-
build-backend = "setuptools.build_meta"
4-
5-
[project]
6-
name = "authforge-sdk"
7-
version = "1.0.0"
8-
description = "Official Python SDK for AuthForge — credit-based license key authentication with Ed25519-verified responses."
9-
readme = "README.md"
10-
requires-python = ">=3.9"
11-
license = { text = "MIT" }
12-
authors = [{ name = "AuthForge" }]
13-
keywords = ["authforge", "license", "licensing", "hwid", "authentication"]
14-
classifiers = [
15-
"Development Status :: 5 - Production/Stable",
16-
"Intended Audience :: Developers",
17-
"License :: OSI Approved :: MIT License",
18-
"Operating System :: OS Independent",
19-
"Programming Language :: Python :: 3",
20-
"Programming Language :: Python :: 3.9",
21-
"Programming Language :: Python :: 3.10",
22-
"Programming Language :: Python :: 3.11",
23-
"Programming Language :: Python :: 3.12",
24-
"Programming Language :: Python :: 3.13",
25-
]
26-
dependencies = ["cryptography>=41.0.0"]
27-
28-
[project.urls]
29-
Homepage = "https://authforge.cc"
30-
Documentation = "https://docs.authforge.cc"
31-
Source = "https://github.com/AuthForgeCC/authforge-python"
32-
Issues = "https://github.com/AuthForgeCC/authforge-python/issues"
33-
34-
[tool.setuptools]
35-
py-modules = ["authforge"]
1+
[build-system]
2+
requires = ["setuptools>=68", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "authforge-sdk"
7+
version = "1.0.0"
8+
description = "Official Python SDK for AuthForge — credit-based license key authentication with Ed25519-verified responses."
9+
readme = "README.md"
10+
requires-python = ">=3.9"
11+
license = { text = "MIT" }
12+
authors = [{ name = "AuthForge" }]
13+
keywords = ["authforge", "license", "licensing", "hwid", "authentication"]
14+
classifiers = [
15+
"Development Status :: 5 - Production/Stable",
16+
"Intended Audience :: Developers",
17+
"License :: OSI Approved :: MIT License",
18+
"Operating System :: OS Independent",
19+
"Programming Language :: Python :: 3",
20+
"Programming Language :: Python :: 3.9",
21+
"Programming Language :: Python :: 3.10",
22+
"Programming Language :: Python :: 3.11",
23+
"Programming Language :: Python :: 3.12",
24+
"Programming Language :: Python :: 3.13",
25+
]
26+
dependencies = ["cryptography>=41.0.0"]
27+
28+
[project.urls]
29+
Homepage = "https://authforge.cc"
30+
Documentation = "https://docs.authforge.cc"
31+
Source = "https://github.com/AuthForgeCC/authforge-python"
32+
Issues = "https://github.com/AuthForgeCC/authforge-python/issues"
33+
34+
[tool.setuptools]
35+
py-modules = ["authforge"]

0 commit comments

Comments
 (0)