summaryrefslogtreecommitdiffstats
path: root/utils/bump_docker.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/bump_docker.py')
-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)