Skip to content

Commit

Permalink
chore: prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
mgred committed Jan 25, 2024
1 parent 998a79a commit 47a8e89
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.git* export-ignore
.pre-commit-config.yaml export-ignore
e2e export-ignore
*_test.bzl export-ignore
18 changes: 17 additions & 1 deletion .github/workflows/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,23 @@ PREFIX="${NAME}-${VERSION}"
RULES_ARCHIVE="${NAME}-${TAG}.tar.gz"

echo -n "build: Create Rules Archive"
git archive --format=tar --prefix=${PREFIX}/ ${TAG} | gzip >$RULES_ARCHIVE
MODULE_BAZEL_FILE="\
module(
name = \"bzlparty_tools\",
version = \"${VERSION}\",
compatibility_level = 1,
)
bazel_dep(name = \"platforms\", version = \"0.0.8\")
"
PUBLIC_PACKAGE="\
package(default_visibility = [\"//visibility:public\"])
exports_files(glob([\"*.bzl\"]))
"
git archive --format=tar \
--add-virtual-file=${PREFIX}/MODULE.bazel:"${MODULE_BAZEL_FILE}" \
--add-virtual-file=${PREFIX}/BUILD.bazel:"package(default_visibility = [\"//visibility:public\"])" \
--add-virtual-file=${PREFIX}/lib/BUILD.bazel:"${PUBLIC_PACKAGE}" \
--prefix=${PREFIX}/ ${TAG} | gzip >$RULES_ARCHIVE
RULES_SHA=$(shasum -a 256 $RULES_ARCHIVE | awk '{print $1}')
echo " ... done ($RULES_ARCHIVE: $RULES_SHA)"

Expand Down

0 comments on commit 47a8e89

Please sign in to comment.