aboutsummaryrefslogtreecommitdiff
path: root/releng/create_release.xsh
diff options
context:
space:
mode:
authorJade Lovelace <lix@jade.fyi>2024-06-09 00:50:40 -0700
committerJade Lovelace <lix@jade.fyi>2024-06-09 20:33:24 -0700
commitce71d0e9abe347147f50fba4bf11eac97b2a90ef (patch)
tree9d5dadf0a4b8232963e642fb4c95fb531f2255b1 /releng/create_release.xsh
parent9aeb314e6a8276d3bd29f968c2baa44d5d19ca37 (diff)
releng: automatically figure out if we should tag latest for docker
For example, when releasing from release-2.90, if `main` has a 2.91 tag ancestor, we know that 2.91 was released, so we should *not* tag latest. Change-Id: Ia56b17a2ee03bbec74b7c271c742858c690d450d
Diffstat (limited to 'releng/create_release.xsh')
-rw-r--r--releng/create_release.xsh15
1 files changed, 1 insertions, 14 deletions
diff --git a/releng/create_release.xsh b/releng/create_release.xsh
index 6f4df2142..373c079bc 100644
--- a/releng/create_release.xsh
+++ b/releng/create_release.xsh
@@ -11,6 +11,7 @@ from .environment import RelengEnvironment
from . import keys
from . import docker
from .version import VERSION, RELEASE_NAME, MAJOR
+from .gitutils import verify_are_on_tag, git_preconditions
$RAISE_SUBPROC_ERROR = True
$XONSH_SHOW_TRACEBACK = True
@@ -38,15 +39,6 @@ def setup_creds(env: RelengEnvironment):
$AWS_ENDPOINT_URL = environment.S3_ENDPOINT
-def git_preconditions():
- # verify there is nothing in index ready to stage
- proc = !(git diff-index --quiet --cached HEAD --)
- assert proc.rtn == 0
- # verify there is nothing *stageable* and tracked
- proc = !(git diff-files --quiet)
- assert proc.rtn == 0
-
-
def official_release_commit_tag(force_tag=False):
print('[+] Setting officialRelease in flake.nix and tagging')
prev_branch = $(git symbolic-ref --short HEAD).strip()
@@ -240,11 +232,6 @@ def prepare_release_notes():
git commit -m @(commit_msg)
-def verify_are_on_tag():
- current_tag = $(git describe --tag).strip()
- assert current_tag == VERSION
-
-
def upload_artifacts(env: RelengEnvironment, noconfirm=False, no_check_git=False, force_push_tag=False):
if not no_check_git:
verify_are_on_tag()