Skip to content

Commit

Permalink
chore: stamp version into release
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Sep 4, 2023
1 parent 4f11fda commit a8c4379
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/release_prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ TAG=${GITHUB_REF_NAME}
# The prefix is chosen to match what GitHub generates for source archives
PREFIX="rules_esbuild-${TAG:1}"
ARCHIVE="rules_esbuild-$TAG.tar.gz"

# Stamp the version into the archive
echo >>.git/info/attributes <<EOF
esbuild/private/versions.bzl export-subst
EOF

git archive --format=tar --prefix=${PREFIX}/ ${TAG} | gzip > $ARCHIVE
SHA=$(shasum -a 256 $ARCHIVE | awk '{print $1}')

Expand Down
2 changes: 2 additions & 0 deletions esbuild/private/versions.bzl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Info for the esbuild packages used"""

RULES_ESBUILD_VERSION = "$Format:%(describe)$" # Replaced during publishing, see .github/workflows/release_prep.sh

# Use /scripts/mirror_release.sh to add a newer version below.
# Versions should be ascending order so TOOL_VERSIONS.keys()[-1] is the latest version.
TOOL_VERSIONS = {
Expand Down

0 comments on commit a8c4379

Please sign in to comment.