Get version number from github instead of azure pipelines in finish_release.py (#10669)

This commit is contained in:
ohemorange 2026-06-10 15:33:22 -07:00 committed by GitHub
parent 9cacd51003
commit dda67bfb9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 71 additions and 75 deletions

View file

@ -43,7 +43,6 @@ install_requires = [
extras_require = {
"dev": [
"apacheconfig>=0.3.2",
"azure-devops",
"build",
"ipdb",
# allows us to use newer urllib3 https://github.com/python-poetry/poetry-plugin-export/issues/183

View file

@ -1,6 +1,6 @@
#!/usr/bin/env python
"""
Post-release script to publish artifacts created from Azure Pipelines.
Post-release script to publish artifacts created from GitHub Actions.
This currently includes:
@ -29,8 +29,6 @@ import re
import subprocess
import sys
from azure.devops.connection import Connection
# Path to the root directory of the Certbot repository containing this script
REPO_ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
# This list contains the names of all Certbot DNS plugins. We used to have a
@ -153,28 +151,25 @@ def promote_snaps(snaps, source_channel, version, progressive_percentage=None):
print(e.stdout)
raise
def fetch_version_number(major_version=None):
"""Retrieve version number for release from Azure Pipelines
:param major_version: only consider releases for the specified major
version
:type major_version: str or None
def fetch_version_number():
"""Retrieve latest release version number from GitHub
:returns: version number
"""
# Create a connection to the azure org
organization_url = 'https://dev.azure.com/certbot'
connection = Connection(base_url=organization_url)
jq_arg = '.[] | select(.isLatest)|.name'
cmd = ['gh', 'release', 'list', '--json', 'name,isLatest', '--jq', jq_arg]
try:
process = subprocess.run(cmd, check=True, stdout=subprocess.PIPE, universal_newlines=True)
except (subprocess.CalledProcessError, OSError):
print("Getting version number from GitHub release failed.")
sys.exit(1)
# Find the build artifacts
build_client = connection.clients.get_build_client()
builds = build_client.get_builds('certbot', definitions='3')
for build in builds:
version = build_client.get_build('certbot', build.id).source_branch.split('v')[1]
if major_version is None or version.split('.')[0] == major_version:
return version
raise ValueError('Release not found on Azure Pipelines!')
name = process.stdout.rstrip().split(' ')
assert len(name) == 2
version = name[-1]
assert len(version.split('.')) == 3
return version
def generate_community_forum_post(version: str):
print('Generating announcement text for community forum post')

View file

@ -11,50 +11,49 @@ anyio==4.13.0 ; python_version >= "3.10" and python_version < "4.0"
apacheconfig==0.3.2 ; python_version >= "3.10" and python_version < "4.0"
astroid==3.3.11 ; python_version >= "3.10" and python_version < "4.0"
asttokens==3.0.1 ; python_version >= "3.10" and python_version < "4.0"
azure-core==1.41.0 ; python_version >= "3.10" and python_version < "4.0"
azure-devops==7.1.0b4 ; python_version >= "3.10" and python_version < "4.0"
babel==2.18.0 ; python_version >= "3.10" and python_version < "4.0"
backports-tarfile==1.2.0 ; python_version >= "3.10" and python_version < "3.12"
backports-zstd==1.5.0 ; python_version >= "3.10" and python_version < "3.14"
bcrypt==5.0.0 ; python_version >= "3.10" and python_version < "4.0"
beautifulsoup4==4.14.3 ; python_version >= "3.10" and python_version < "4.0"
boto3==1.43.9 ; python_version >= "3.10" and python_version < "4.0"
botocore==1.43.9 ; python_version >= "3.10" and python_version < "4.0"
beautifulsoup4==4.15.0 ; python_version >= "3.10" and python_version < "4.0"
boto3==1.43.26 ; python_version >= "3.10" and python_version < "4.0"
botocore==1.43.26 ; python_version >= "3.10" and python_version < "4.0"
build==1.5.0 ; python_version >= "3.10" and python_version < "4.0"
cachecontrol==0.14.4 ; python_version >= "3.10" and python_version < "4.0"
cachetools==7.1.3 ; python_version >= "3.10" and python_version < "4.0"
certifi==2026.4.22 ; python_version >= "3.10" and python_version < "4.0"
cachetools==7.1.4 ; python_version >= "3.10" and python_version < "4.0"
certifi==2026.5.20 ; python_version >= "3.10" and python_version < "4.0"
cffi==2.0.0 ; python_version >= "3.10" and python_version < "4.0"
charset-normalizer==3.4.7 ; python_version >= "3.10" and python_version < "4.0"
cleo==2.1.0 ; python_version >= "3.10" and python_version < "4.0"
click==8.4.0 ; python_version >= "3.10" and python_version < "4.0"
cloudflare==5.1.0 ; python_version >= "3.10" and python_version < "4.0"
click==8.4.1 ; python_version >= "3.10" and python_version < "4.0"
cloudflare==5.2.0 ; python_version >= "3.10" and python_version < "4.0"
colorama==0.4.6 ; python_version >= "3.10" and python_version < "4.0"
configargparse==1.7.5 ; python_version >= "3.10" and python_version < "4.0"
configobj==5.0.9 ; python_version >= "3.10" and python_version < "4.0"
coverage==7.14.0 ; python_version >= "3.10" and python_version < "4.0"
coverage==7.14.1 ; python_version >= "3.10" and python_version < "4.0"
crashtest==0.4.1 ; python_version >= "3.10" and python_version < "4.0"
cryptography==48.0.0 ; python_version >= "3.10" and python_version < "4.0"
cython==0.29.37 ; python_version >= "3.10" and python_version < "3.13"
cython==3.2.4 ; python_version >= "3.13" and python_version < "4.0"
cryptography==48.0.1 ; python_version >= "3.10" and python_version < "4.0"
cython==0.29.37 ; python_version >= "3.10" and python_version <= "3.12"
cython==3.2.5 ; python_version >= "3.13" and python_version < "4.0"
decorator==5.3.1 ; python_version >= "3.10" and python_version < "4.0"
deprecated==1.3.1 ; python_version >= "3.10" and python_version < "4.0"
dill==0.4.1 ; python_version >= "3.10" and python_version < "4.0"
distlib==0.4.0 ; python_version >= "3.10" and python_version < "4.0"
distlib==0.4.2 ; python_version >= "3.10" and python_version < "4.0"
distro==1.9.0 ; python_version >= "3.10" and python_version < "4.0"
dns-lexicon==3.25.2 ; python_version >= "3.10" and python_version < "4.0"
dnspython==2.8.0 ; python_version >= "3.10" and python_version < "4.0"
docutils==0.21.2 ; python_version >= "3.10" and python_version < "4.0"
dulwich==1.2.1 ; python_version >= "3.10" and python_version < "4.0"
exceptiongroup==1.3.1 ; python_version >= "3.10" and python_version < "3.11"
docutils==0.21.2 ; python_version == "3.10"
docutils==0.22.4 ; python_version >= "3.11" and python_version < "4.0"
dulwich==1.2.6 ; python_version >= "3.10" and python_version < "4.0"
exceptiongroup==1.3.1 ; python_version == "3.10"
execnet==2.1.2 ; python_version >= "3.10" and python_version < "4.0"
executing==2.2.1 ; python_version >= "3.10" and python_version < "4.0"
fabric==3.2.3 ; python_version >= "3.10" and python_version < "4.0"
fastjsonschema==2.21.2 ; python_version >= "3.10" and python_version < "4.0"
filelock==3.29.0 ; python_version >= "3.10" and python_version < "4.0"
filelock==3.29.3 ; python_version >= "3.10" and python_version < "4.0"
findpython==0.8.0 ; python_version >= "3.10" and python_version < "4.0"
google-api-core==2.30.3 ; python_version >= "3.10" and python_version < "4.0"
google-api-python-client==2.196.0 ; python_version >= "3.10" and python_version < "4.0"
google-api-core==2.31.0 ; python_version >= "3.10" and python_version < "4.0"
google-api-python-client==2.197.0 ; python_version >= "3.10" and python_version < "4.0"
google-auth-httplib2==0.4.0 ; python_version >= "3.10" and python_version < "4.0"
google-auth==2.53.0 ; python_version >= "3.10" and python_version < "4.0"
googleapis-common-protos==1.75.0 ; python_version >= "3.10" and python_version < "4.0"
@ -63,15 +62,17 @@ httpcore==1.0.9 ; python_version >= "3.10" and python_version < "4.0"
httplib2==0.31.2 ; python_version >= "3.10" and python_version < "4.0"
httpx==0.28.1 ; python_version >= "3.10" and python_version < "4.0"
id==1.6.1 ; python_version >= "3.10" and python_version < "4.0"
idna==3.15 ; python_version >= "3.10" and python_version < "4.0"
imagesize==1.5.0 ; python_version >= "3.10" and python_version < "4.0"
idna==3.18 ; python_version >= "3.10" and python_version < "4.0"
imagesize==1.5.0 ; python_version >= "3.13" and python_version < "4.0"
imagesize==2.0.0 ; python_version >= "3.10" and python_version <= "3.12"
importlib-metadata==9.0.0 ; python_version >= "3.10" and python_version < "3.12"
iniconfig==2.3.0 ; python_version >= "3.10" and python_version < "4.0"
installer==1.0.1 ; python_version >= "3.10" and python_version < "4.0"
invoke==2.2.1 ; python_version >= "3.10" and python_version < "4.0"
ipdb==0.13.13 ; python_version >= "3.10" and python_version < "4.0"
ipython==8.39.0 ; python_version >= "3.10" and python_version < "4.0"
isodate==0.7.2 ; python_version >= "3.10" and python_version < "4.0"
ipython-pygments-lexers==1.1.1 ; python_version >= "3.11" and python_version < "4.0"
ipython==8.39.0 ; python_version == "3.10"
ipython==9.14.1 ; python_version >= "3.11" and python_version < "4.0"
isort==5.13.2 ; python_version >= "3.10" and python_version < "4.0"
jaraco-classes==3.4.0 ; python_version >= "3.10" and python_version < "4.0"
jaraco-context==6.1.2 ; python_version >= "3.10" and python_version < "4.0"
@ -81,29 +82,27 @@ jeepney==0.9.0 ; python_version >= "3.10" and python_version < "4.0" and sys_pla
jinja2==3.1.6 ; python_version >= "3.10" and python_version < "4.0"
jmespath==1.1.0 ; python_version >= "3.10" and python_version < "4.0"
josepy==2.2.0 ; python_version >= "3.10" and python_version < "4.0"
jsonpickle==4.1.1 ; python_version >= "3.10" and python_version < "4.0"
jsonpickle==4.1.2 ; python_version >= "3.10" and python_version < "4.0"
keyring==25.7.0 ; python_version >= "3.10" and python_version < "4.0"
markdown-it-py==4.2.0 ; python_version >= "3.10" and python_version < "4.0"
markupsafe==3.0.3 ; python_version >= "3.10" and python_version < "4.0"
matplotlib-inline==0.2.2 ; python_version >= "3.10" and python_version < "4.0"
mccabe==0.7.0 ; python_version >= "3.10" and python_version < "4.0"
mdurl==0.1.2 ; python_version >= "3.10" and python_version < "4.0"
more-itertools==11.0.2 ; python_version >= "3.10" and python_version < "4.0"
more-itertools==11.1.0 ; python_version >= "3.10" and python_version < "4.0"
msgpack==1.1.2 ; python_version >= "3.10" and python_version < "4.0"
msrest==0.7.1 ; python_version >= "3.10" and python_version < "4.0"
mypy-extensions==1.1.0 ; python_version >= "3.10" and python_version < "4.0"
mypy==1.9.0 ; python_version >= "3.10" and python_version < "4.0"
nh3==0.3.5 ; python_version >= "3.10" and python_version < "4.0"
oauthlib==3.3.1 ; python_version >= "3.10" and python_version < "4.0"
packaging==26.2 ; python_version >= "3.10" and python_version < "4.0"
paramiko==5.0.0 ; python_version >= "3.10" and python_version < "4.0"
parsedatetime==2.6 ; python_version >= "3.10" and python_version < "4.0"
parso==0.8.7 ; python_version >= "3.10" and python_version < "4.0"
pbs-installer==2026.5.10 ; python_version >= "3.10" and python_version < "4.0"
pexpect==4.9.0 ; python_version >= "3.10" and python_version < "4.0" and (sys_platform != "win32" and sys_platform != "emscripten")
pip==26.1.1 ; python_version >= "3.10" and python_version < "4.0"
pbs-installer==2026.6.2 ; python_version >= "3.10" and python_version < "4.0"
pexpect==4.9.0 ; python_version >= "3.10" and python_version < "4.0" and sys_platform != "win32" and sys_platform != "emscripten"
pip==26.1.2 ; python_version >= "3.10" and python_version < "4.0"
pkginfo==1.12.1.2 ; python_version >= "3.10" and python_version < "4.0"
platformdirs==4.9.6 ; python_version >= "3.10" and python_version < "4.0"
platformdirs==4.10.0 ; python_version >= "3.10" and python_version < "4.0"
pluggy==1.6.0 ; python_version >= "3.10" and python_version < "4.0"
ply==3.11 ; python_version >= "3.10" and python_version < "4.0"
poetry-core==2.4.0 ; python_version >= "3.10" and python_version < "4.0"
@ -111,8 +110,9 @@ poetry-plugin-export==1.10.0 ; python_version >= "3.10" and python_version < "4.
poetry==2.4.1 ; python_version >= "3.10" and python_version < "4.0"
prompt-toolkit==3.0.52 ; python_version >= "3.10" and python_version < "4.0"
proto-plus==1.28.0 ; python_version >= "3.10" and python_version < "4.0"
protobuf==7.34.1 ; python_version >= "3.10" and python_version < "4.0"
ptyprocess==0.7.0 ; python_version >= "3.10" and python_version < "4.0" and (sys_platform != "win32" and sys_platform != "emscripten")
protobuf==7.35.0 ; python_version >= "3.10" and python_version < "4.0"
psutil==7.2.2 ; python_version >= "3.11" and python_version < "4.0" and sys_platform != "emscripten"
ptyprocess==0.7.0 ; python_version >= "3.10" and python_version < "4.0" and sys_platform != "win32" and sys_platform != "emscripten"
pure-eval==0.2.3 ; python_version >= "3.10" and python_version < "4.0"
pyasn1-modules==0.4.2 ; python_version >= "3.10" and python_version < "4.0"
pyasn1==0.6.3 ; python_version >= "3.10" and python_version < "4.0"
@ -125,7 +125,7 @@ pynacl==1.6.2 ; python_version >= "3.10" and python_version < "4.0"
pyopenssl==26.2.0 ; python_version >= "3.10" and python_version < "4.0"
pyotp==2.9.0 ; python_version >= "3.10" and python_version < "4.0"
pyparsing==3.3.2 ; python_version >= "3.10" and python_version < "4.0"
pyproject-api==1.10.0 ; python_version >= "3.10" and python_version < "4.0"
pyproject-api==1.10.1 ; python_version >= "3.10" and python_version < "4.0"
pyproject-hooks==1.2.0 ; python_version >= "3.10" and python_version < "4.0"
pyrfc3339==2.1.0 ; python_version >= "3.10" and python_version < "4.0"
pytest-cov==7.1.0 ; python_version >= "3.10" and python_version < "4.0"
@ -134,21 +134,21 @@ pytest==9.0.3 ; python_version >= "3.10" and python_version < "4.0"
python-augeas==1.2.0 ; python_version >= "3.10" and python_version < "4.0"
python-dateutil==2.9.0.post0 ; python_version >= "3.10" and python_version < "4.0"
python-digitalocean==1.17.0 ; python_version >= "3.10" and python_version < "4.0"
python-discovery==1.3.1 ; python_version >= "3.10" and python_version < "4.0"
python-discovery==1.4.0 ; python_version >= "3.10" and python_version < "4.0"
pywin32-ctypes==0.2.3 ; python_version >= "3.10" and python_version < "4.0" and sys_platform == "win32"
pywin32==311 ; python_version >= "3.10" and python_version < "4.0" and sys_platform == "win32"
pywin32==312 ; python_version >= "3.10" and python_version < "4.0" and sys_platform == "win32"
pyyaml==6.0.3 ; python_version >= "3.10" and python_version < "4.0"
rapidfuzz==3.14.5 ; python_version >= "3.10" and python_version < "4.0"
readme-renderer==44.0 ; python_version >= "3.10" and python_version < "4.0"
readme-renderer==45.0 ; python_version >= "3.10" and python_version < "4.0"
requests-file==3.0.1 ; python_version >= "3.10" and python_version < "4.0"
requests-oauthlib==2.0.0 ; python_version >= "3.10" and python_version < "4.0"
requests-toolbelt==1.0.0 ; python_version >= "3.10" and python_version < "4.0"
requests-unixsocket==0.4.1 ; python_version >= "3.10" and python_version < "4.0"
requests==2.34.2 ; python_version >= "3.10" and python_version < "4.0"
rfc3986==2.0.0 ; python_version >= "3.10" and python_version < "4.0"
rich==15.0.0 ; python_version >= "3.10" and python_version < "4.0"
ruff==0.15.13 ; python_version >= "3.10" and python_version < "4.0"
s3transfer==0.17.0 ; python_version >= "3.10" and python_version < "4.0"
roman-numerals==4.1.0 ; python_version >= "3.11" and python_version < "4.0"
ruff==0.15.16 ; python_version >= "3.10" and python_version < "4.0"
s3transfer==0.18.0 ; python_version >= "3.10" and python_version < "4.0"
secretstorage==3.5.0 ; python_version >= "3.10" and python_version < "4.0" and sys_platform == "linux"
semantic-version==2.10.0 ; python_version >= "3.10" and python_version < "4.0"
setuptools-rust==1.12.1 ; python_version >= "3.10" and python_version < "4.0"
@ -156,10 +156,12 @@ setuptools==82.0.1 ; python_version >= "3.10" and python_version < "4.0"
shellingham==1.5.4 ; python_version >= "3.10" and python_version < "4.0"
six==1.17.0 ; python_version >= "3.10" and python_version < "4.0"
sniffio==1.3.1 ; python_version >= "3.10" and python_version < "4.0"
snowballstemmer==3.0.1 ; python_version >= "3.10" and python_version < "4.0"
soupsieve==2.8.3 ; python_version >= "3.10" and python_version < "4.0"
snowballstemmer==3.1.1 ; python_version >= "3.10" and python_version < "4.0"
soupsieve==2.8.4 ; python_version >= "3.10" and python_version < "4.0"
sphinx-rtd-theme==3.1.0 ; python_version >= "3.10" and python_version < "4.0"
sphinx==8.1.3 ; python_version >= "3.10" and python_version < "4.0"
sphinx==8.1.3 ; python_version == "3.10"
sphinx==9.0.4 ; python_version == "3.11"
sphinx==9.1.0 ; python_version >= "3.12" and python_version < "4.0"
sphinxcontrib-applehelp==2.0.0 ; python_version >= "3.10" and python_version < "4.0"
sphinxcontrib-devhelp==2.0.0 ; python_version >= "3.10" and python_version < "4.0"
sphinxcontrib-htmlhelp==2.1.0 ; python_version >= "3.10" and python_version < "4.0"
@ -170,27 +172,27 @@ sphinxcontrib-serializinghtml==2.0.0 ; python_version >= "3.10" and python_versi
stack-data==0.6.3 ; python_version >= "3.10" and python_version < "4.0"
tldextract==5.3.1 ; python_version >= "3.10" and python_version < "4.0"
tomli-w==1.2.0 ; python_version >= "3.10" and python_version < "4.0"
tomli==2.4.1 ; python_version >= "3.10" and python_version < "3.11"
tomli==2.4.1 ; python_version == "3.10"
tomlkit==0.15.0 ; python_version >= "3.10" and python_version < "4.0"
towncrier==25.8.0 ; python_version >= "3.10" and python_version < "4.0"
tox==4.54.0 ; python_version >= "3.10" and python_version < "4.0"
traitlets==5.15.0 ; python_version >= "3.10" and python_version < "4.0"
trove-classifiers==2026.5.7.17 ; python_version >= "3.10" and python_version < "4.0"
tox==4.55.1 ; python_version >= "3.10" and python_version < "4.0"
traitlets==5.15.1 ; python_version >= "3.10" and python_version < "4.0"
trove-classifiers==2026.6.1.19 ; python_version >= "3.10" and python_version < "4.0"
twine==6.2.0 ; python_version >= "3.10" and python_version < "4.0"
types-httplib2==0.31.2.20260408 ; python_version >= "3.10" and python_version < "4.0"
types-pyrfc3339==2.0.1.20250825 ; python_version >= "3.10" and python_version < "4.0"
types-python-dateutil==2.9.0.20260518 ; python_version >= "3.10" and python_version < "4.0"
types-pywin32==311.0.0.20260518 ; python_version >= "3.10" and python_version < "4.0"
types-pywin32==312.0.0.20260609 ; python_version >= "3.10" and python_version < "4.0"
types-requests==2.33.0.20260518 ; python_version >= "3.10" and python_version < "4.0"
types-setuptools==82.0.0.20260518 ; python_version >= "3.10" and python_version < "4.0"
typing-extensions==4.15.0 ; python_version >= "3.10" and python_version < "4.0"
typing-inspection==0.4.2 ; python_version >= "3.10" and python_version < "4.0"
uritemplate==4.2.0 ; python_version >= "3.10" and python_version < "4.0"
urllib3==2.7.0 ; python_version >= "3.10" and python_version < "4.0"
uv==0.11.14 ; python_version >= "3.10" and python_version < "4.0"
virtualenv==21.3.3 ; python_version >= "3.10" and python_version < "4.0"
wcwidth==0.7.0 ; python_version >= "3.10" and python_version < "4.0"
uv==0.11.20 ; python_version >= "3.10" and python_version < "4.0"
virtualenv==21.4.2 ; python_version >= "3.10" and python_version < "4.0"
wcwidth==0.8.1 ; python_version >= "3.10" and python_version < "4.0"
wheel==0.47.0 ; python_version >= "3.10" and python_version < "4.0"
wrapt==2.1.2 ; python_version >= "3.10" and python_version < "4.0"
wrapt==2.2.1 ; python_version >= "3.10" and python_version < "4.0"
xattr==1.3.0 ; python_version >= "3.10" and python_version < "4.0" and sys_platform == "darwin"
zipp==3.23.1 ; python_version >= "3.10" and python_version < "3.12"
zipp==4.1.0 ; python_version >= "3.10" and python_version < "3.12"