Add option to use non-master branch for releasing

This commit is contained in:
Felix Schütt
2023-01-26 13:34:37 +01:00
parent d1b7158e8a
commit 8260736716

View File

@@ -12,6 +12,7 @@ import re
RELEASE_VERSION=""
DATE = datetime.date.today().strftime("%d/%m/%Y")
SIGNOFF_REVIEWER = "syrusakbary"
TAG = "master"
if len(sys.argv) > 1:
RELEASE_VERSION = sys.argv[1]
@@ -19,6 +20,10 @@ else:
print("no release version as first argument")
sys.exit(1)
if len(sys.argv) > 2:
TAG = sys.argv[2]
RELEASE_VERSION_WITH_V = RELEASE_VERSION
if not(RELEASE_VERSION.startswith("v")):
@@ -59,7 +64,7 @@ def make_release(version):
temp_dir = tempfile.TemporaryDirectory()
print(temp_dir.name)
if os.system("git clone https://github.com/wasmerio/wasmer --branch master --depth 1 " + temp_dir.name) != 0:
if os.system("git clone https://github.com/wasmerio/wasmer --branch " + TAG + " --depth 1 " + temp_dir.name) != 0:
raise Exception("could not clone github repo")
# generate changelog