mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-11-30 16:48:21 +01:00
24 lines
827 B
Python
24 lines
827 B
Python
|
|
# ------------------------------------------------------------
|
|
# Copyright (c) Microsoft Corporation and Dapr Contributors.
|
|
# Licensed under the MIT License.
|
|
# ------------------------------------------------------------
|
|
|
|
# This script parses release version from Git tag and set the parsed version to
|
|
# environment variable, REL_VERSION. If the tag is the final version, it sets
|
|
|
|
import os
|
|
import sys
|
|
|
|
gitRef = os.getenv("GITHUB_REF")
|
|
tagRefPrefix = "refs/tags/v"
|
|
|
|
with open(os.getenv("GITHUB_ENV"), "a") as githubEnv:
|
|
|
|
if gitRef is None or not gitRef.startswith(tagRefPrefix):
|
|
githubEnv.write("REL_VERSION=latest\n")
|
|
print ("This is daily build from {}...".format(gitRef))
|
|
sys.exit(0)
|
|
|
|
releaseVersion = gitRef[len(tagRefPrefix):]
|
|
githubEnv.write("REL_VERSION={}\n".format(releaseVersion)) |