Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • heptapod/heptapod-docker
1 result
Show changes
Commits on Source (2)
......@@ -31,7 +31,8 @@
)
parser.add_argument("--podman", action="store_true",
help="Use Podman instead of Docker")
parser.add_argument("--push", help="Push to Docker Hub", action="store_true")
parser.add_argument("--push", help="Push to distribution registry",
action="store_true")
parser.add_argument("--tag",
help="TAG of the image to pull *and* the image to push",
default=DEFAULT_IMAGE_TAG)
......
......@@ -2,6 +2,7 @@
import argparse
import logging
from pathlib import Path
import re
import subprocess
FILE_PATH = Path(__file__)
......@@ -9,7 +10,7 @@
logger = logging.getLogger(FILE_PATH.name.rsplit('.', 1)[0])
TWITT_TEMPLATE = (
TWITT_TEMPLATE_RC = (
"#heptapod {version} "
"released, COMMENT_HERE "
"Docker: https://hub.docker.com/r/heptapod/heptapod/"
......@@ -18,6 +19,21 @@
"HEPTAPOD_CHANGELOG.md #git #mercurial"
)
TWITT_TEMPLATE_FINAL = (
"#heptapod {version} "
"released, COMMENT_HERE "
"Changelog: "
"https://foss.heptapod.net/heptapod/heptapod/-/blob/heptapod-{version}/"
"HEPTAPOD_CHANGELOG.md "
"Download instructions: "
"https://heptapod.net/pages/get-heptapod.html#get-heptapod "
"#git #mercurial"
)
def is_final_version(version):
return re.match(r'^\d+\.\d+\.\d+$', version) is not None
def validate_sha256(s):
assert len(s) == 64
......@@ -84,7 +100,8 @@
latest = validate_yes(input("Update the `latest` container tag (y/N)? "))
logger.info("Pulling image %r from registry.h.n, pushing it "
"to docker.io, testing consistency with Omnibus tag %r, "
"to distribution registry, testing consistency with "
"Omnibus tag %r, "
"and pushing version tag for series %r, with latest=%r.",
image_testing_tag,
omnibus_tag,
......@@ -107,7 +124,11 @@
check_call(push_release, simulate=simulate)
print("\nNow brag about it on social media, inserting additional comments "
"into the following:\n")
print(TWITT_TEMPLATE.format(version=version))
if is_final_version(version):
tmpl = TWITT_TEMPLATE_FINAL
else:
tmpl = TWITT_TEMPLATE_RC
print(tmpl.format(version=version))
if __name__ == '__main__':
......