Skip to content

Commit

Permalink
refactor: put 'git archive' config in .git attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Nov 1, 2023
1 parent 044face commit 5c2d851
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
docs/*.md linguist-generated=true

# Configuration for 'git archive'
# see https://git-scm.com/docs/git-archive/2.40.0#ATTRIBUTES
# Stamp the version into the archive
esbuild/private/versions.bzl export-subst
6 changes: 1 addition & 5 deletions .github/workflows/release_prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ TAG=${GITHUB_REF_NAME}
PREFIX="rules_esbuild-${TAG:1}"
ARCHIVE="rules_esbuild-$TAG.tar.gz"

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

# NB: configuration for 'git archive' is in /.gitattributes
git archive --format=tar --prefix=${PREFIX}/ ${TAG} | gzip > $ARCHIVE
SHA=$(shasum -a 256 $ARCHIVE | awk '{print $1}')

Expand Down

0 comments on commit 5c2d851

Please sign in to comment.