Skip to content

Commit

Permalink
update tags to always push tag edge/branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Matchlighter committed Feb 15, 2024
1 parent ae1a8a4 commit 07d6a49
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions script/generate_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,18 @@ def set_version(v):

if os.environ.get("GITHUB_EVENT_NAME", None) == "release":
set_version(os.environ.get("GITHUB_REF").replace("refs/tags/", ""))
elif branch == "master" and args.package_version_changed == "true":
set_version(args.package_version)
else:
sha = os.environ.get("GITHUB_SHA", "")
datecode = datetime.datetime.now().isoformat()
version = f"{branch}-{sha}-{datecode}"
if branch == "master" and args.package_version_changed == "true":
set_version(args.package_version)
else:
sha = os.environ.get("GITHUB_SHA", "")
datecode = datetime.datetime.now().isoformat()
version = f"{branch}-{sha}-{datecode}"

if branch == "master":
tags_to_push.append("edge")
else:
tags_to_push.append(f"branch-{branch}")

tags_to_push.append(f"branch-{branch}")

if channel == CHANNEL_BETA:
tags_to_push.append("beta")
Expand Down

0 comments on commit 07d6a49

Please sign in to comment.