Merge branch 'srht-builds' into 218-python3.8-flatpak

This commit is contained in:
Sumner Evans
2020-09-19 10:54:09 -06:00
94 changed files with 1641 additions and 159 deletions

27
cicd/run_if_tagged_with_version Executable file
View File

@@ -0,0 +1,27 @@
#! /usr/bin/env python3
import re
import subprocess
import sys
version_tag_re = re.compile(r"v\d+\.\d+\.\d+")
tags = (
subprocess.run(["git", "tag", "--contains", "HEAD"], capture_output=True)
.stdout.decode()
.strip()
.split()
)
# If one of the tags is a version tag, then run the commands specified in the
# parameters.
for tag in tags:
if match := version_tag_re.match(tag):
print(f"VERSION TAG {tag} FOUND")
# Execute the associated commands, raising an exception if the command
# returns a non-zero value.
for arg in sys.argv[1:]:
print(f"+ {' '.join(arg.split())}")
subprocess.run(arg.split()).check_returncode()