summaryrefslogtreecommitdiffstats
path: root/utils/bump_docker.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 16:20:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 16:20:58 +0000
commitffcb4b87846b4e4a2d9eee8df4b7ec40365878b8 (patch)
tree3c64877dd20ad1141111c77b3463e95686002b39 /utils/bump_docker.py
parentAdding debian version 7.2.6-8. (diff)
downloadsphinx-ffcb4b87846b4e4a2d9eee8df4b7ec40365878b8.tar.xz
sphinx-ffcb4b87846b4e4a2d9eee8df4b7ec40365878b8.zip
Merging upstream version 7.3.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x[-rw-r--r--]utils/bump_docker.py32
1 files changed, 19 insertions, 13 deletions
diff --git a/utils/bump_docker.py b/utils/bump_docker.py
index ec4a1c7..8f385ae 100644..100755
--- a/utils/bump_docker.py
+++ b/utils/bump_docker.py
@@ -25,22 +25,28 @@ SPHINX_VERSION_PREFIX = 'Sphinx=='
for file in DOCKERFILE_BASE, DOCKERFILE_LATEXPDF:
content = file.read_text(encoding='utf-8')
- content = re.sub(rf'{re.escape(OPENCONTAINERS_VERSION_PREFIX)} = "{VERSION_PATTERN}"',
- rf'{OPENCONTAINERS_VERSION_PREFIX} = "{VERSION}"',
- content)
- content = re.sub(rf'{re.escape(SPHINX_VERSION_PREFIX)}{VERSION_PATTERN}',
- rf'{SPHINX_VERSION_PREFIX}{VERSION}',
- content)
+ content = re.sub(
+ rf'{re.escape(OPENCONTAINERS_VERSION_PREFIX)} = "{VERSION_PATTERN}"',
+ rf'{OPENCONTAINERS_VERSION_PREFIX} = "{VERSION}"',
+ content,
+ )
+ content = re.sub(
+ rf'{re.escape(SPHINX_VERSION_PREFIX)}{VERSION_PATTERN}',
+ rf'{SPHINX_VERSION_PREFIX}{VERSION}',
+ content,
+ )
file.write_text(content, encoding='utf-8')
-def git(*args):
- ret = subprocess.run(('git', *args),
- capture_output=True,
- cwd=DOCKER_ROOT,
- check=True,
- text=True,
- encoding='utf-8')
+def git(*args: str) -> None:
+ ret = subprocess.run(
+ ('git', *args),
+ capture_output=True,
+ cwd=DOCKER_ROOT,
+ check=True,
+ text=True,
+ encoding='utf-8',
+ )
print(ret.stdout)
print(ret.stderr, file=sys.stderr)