Skip to content

Commit bbebaf3

Browse files
committed
fix grepping of code
1 parent 84607f1 commit bbebaf3

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/create_archive_and_notes.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ if [ -z "$TAG" ]; then
2424
echo "ERROR: TAG env var must be set"
2525
exit 1
2626
fi
27+
# If the workflow checks out one commit, but is releasing another
28+
git fetch origin tag "$TAG"
29+
# Update our local state so the grep command below searches what we expect
30+
git checkout "$TAG"
31+
2732
# Exclude dot directories, specifically, this file so that we don't
2833
# find the substring we're looking for in our own file.
2934
# Exclude CONTRIBUTING.md, RELEASING.md because they document how to use these strings.
@@ -43,8 +48,6 @@ fi
4348
# A prefix is added to better match the GitHub generated archives.
4449
PREFIX="rules_python-${TAG}"
4550
ARCHIVE="rules_python-$TAG.tar.gz"
46-
# If the workflow checks out one commit, but is releasing another
47-
git fetch origin tag "$TAG"
4851
git archive --format=tar "--prefix=${PREFIX}/" "$TAG" | gzip > "$ARCHIVE"
4952
SHA=$(shasum -a 256 "$ARCHIVE" | awk '{print $1}')
5053

0 commit comments

Comments
 (0)