Skip to content

Commit

Permalink
Prepare release scripts for the new tag format (#1162)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladmos authored Apr 27, 2023
1 parent 3dcc8d6 commit a607619
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions release/github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ then
exit 1
fi

TAG="$(git describe --abbrev=0 --tags | sed 's/* //')"
TAG="$(git describe --abbrev=0 --tags | sed 's/* //')" # v1.2.3
VERSION=$(echo $TAG | sed 's/v//') # 1.2.3
DATE="$(date +"%Y-%m-%d")"
NAME="Release $TAG ($DATE)"
NAME="Release $VERSION ($DATE)"

GH_REPO="repos/bazelbuild/buildtools"
GH_AUTH_HEADER="Authorization: token $GITHUB_ACCESS_TOKEN"
Expand Down
7 changes: 4 additions & 3 deletions status.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ def run(*cmd):

def main():
tags = run("git", "describe", "--tags")
print("STABLE_buildVersion", tags.split("-")[0])
version = tags.lstrip('v')
print("STABLE_buildVersion", version)

# rules_nodejs expects to read from volatile-status.txt
print("BUILD_SCM_VERSION", tags.split("-")[0])
print("BUILD_SCM_VERSION", version)

revision = run("git", "rev-parse", "HEAD")
print("STABLE_buildScmRevision", revision)

Expand Down

0 comments on commit a607619

Please sign in to comment.