Skip to content
Snippets Groups Projects
Commit 9b70fb4dd3ea authored by Georges Racinet's avatar Georges Racinet :squid:
Browse files

release-full: different microblogging messages for final and rc

parent 7b5986eb9dd8
No related branches found
No related tags found
No related merge requests found
Pipeline #98968 passed
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import argparse import argparse
import logging import logging
from pathlib import Path from pathlib import Path
import re
import subprocess import subprocess
FILE_PATH = Path(__file__) FILE_PATH = Path(__file__)
...@@ -9,7 +10,7 @@ ...@@ -9,7 +10,7 @@
logger = logging.getLogger(FILE_PATH.name.rsplit('.', 1)[0]) logger = logging.getLogger(FILE_PATH.name.rsplit('.', 1)[0])
TWITT_TEMPLATE = ( TWITT_TEMPLATE_RC = (
"#heptapod {version} " "#heptapod {version} "
"released, COMMENT_HERE " "released, COMMENT_HERE "
"Docker: https://hub.docker.com/r/heptapod/heptapod/" "Docker: https://hub.docker.com/r/heptapod/heptapod/"
...@@ -18,6 +19,21 @@ ...@@ -18,6 +19,21 @@
"HEPTAPOD_CHANGELOG.md #git #mercurial" "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): def validate_sha256(s):
assert len(s) == 64 assert len(s) == 64
...@@ -108,7 +124,11 @@ ...@@ -108,7 +124,11 @@
check_call(push_release, simulate=simulate) check_call(push_release, simulate=simulate)
print("\nNow brag about it on social media, inserting additional comments " print("\nNow brag about it on social media, inserting additional comments "
"into the following:\n") "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__': if __name__ == '__main__':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment