

7 changed files with 102 additions and 11 deletions
@ -0,0 +1,34 @@
|
||||
# |
||||
# Used during the release process to make sure that we release based on a |
||||
# tag that has the same version as the current twisted.__version. |
||||
# |
||||
# Designed to be conditionally called inside GitHub Actions release job. |
||||
# Tags should use PEP440 version scheme. |
||||
# |
||||
# To be called as: admin/check_tag_version_match.py refs/tags/twisted-20.3.0 |
||||
# |
||||
import sys |
||||
|
||||
import pep517.meta |
||||
|
||||
TAG_PREFIX = "refs/tags/" |
||||
|
||||
if len(sys.argv) < 2: |
||||
print("No tag check requested.") |
||||
sys.exit(0) |
||||
|
||||
branch_version = pep517.meta.load(".").version |
||||
run_version = sys.argv[1] |
||||
|
||||
if not run_version.startswith(TAG_PREFIX): |
||||
print("Not a twisted release tag name '{}.".format(run_version)) |
||||
sys.exit(1) |
||||
|
||||
run_version = run_version[len(TAG_PREFIX) :] |
||||
|
||||
if run_version != branch_version: |
||||
print("Branch is at '{}' while tag is '{}'".format(branch_version, run_version)) |
||||
exit(1) |
||||
|
||||
print("All good. Branch and tag versions match for '{}'.".format(branch_version)) |
||||
sys.exit(0) |
@ -1,6 +1,16 @@
|
||||
# build the sdist |
||||
|
||||
set -evx |
||||
|
||||
check-manifest --verbose ${toxinidir} |
||||
|
||||
python -m build --sdist --outdir ${toxinidir}/dist/ ${toxinidir} |
||||
|
||||
tar -xvf ${toxinidir}/dist/* |
||||
cd * |
||||
|
||||
# build the wheel from the sdist |
||||
python -m build --wheel --outdir ${toxinidir}/dist/ . |
||||
cd - |
||||
|
||||
twine check ${toxinidir}/dist/* |
||||
|
Loading…
Reference in new issue