File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,6 +19,11 @@ set -o errexit
1919
2020set -x
2121
22+ TAG=$1
23+ if [ -z " $TAG " ]; then
24+ echo " ERROR: TAG env var must be set"
25+ exit 1
26+ fi
2227# Exclude dot directories, specifically, this file so that we don't
2328# find the substring we're looking for in our own file.
2429# Exclude CONTRIBUTING.md, RELEASING.md because they document how to use these strings.
@@ -35,14 +40,10 @@ if [[ $grep_exit_code -eq 0 ]]; then
3540 exit 1
3641fi
3742
38- TAG=$1
39- if [ -z " $TAG " ]; then
40- echo " ERROR: TAG env var must be set"
41- exit 1
42- fi
4343# A prefix is added to better match the GitHub generated archives.
4444PREFIX=" rules_python-${TAG} "
4545ARCHIVE=" rules_python-$TAG .tar.gz"
46+ # If the workflow checks out one commit, but is releasing another
4647git fetch origin tag " $TAG "
4748git archive --format=tar " --prefix=${PREFIX} /" " $TAG " | gzip > " $ARCHIVE "
4849SHA=$( shasum -a 256 " $ARCHIVE " | awk ' {print $1}' )
You can’t perform that action at this time.
0 commit comments