-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(rules_task): Include workspace snippet in release notes (#586)
- Loading branch information
Showing
3 changed files
with
41 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -Eeou pipefail | ||
|
||
export VERSION="v$1" | ||
|
||
export PREFIX="rules_task-$VERSION" | ||
export ARCHIVE="rules_task-$VERSION.tar.gz" | ||
|
||
git archive --format=tar --prefix=${PREFIX}/ HEAD | gzip > $ARCHIVE | ||
|
||
export SHA=$(shasum -a 256 $ARCHIVE | awk '{print $1}') | ||
|
||
cat << EOF | ||
## Using WORKSPACE: | ||
\`\`\`starlark | ||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
http_archive( | ||
name = "rules_task", | ||
sha256 = "${SHA}", | ||
strip_prefix = "${PREFIX}", | ||
url = "https://github.com/vgijssel/setup/releases/download/${PREFIX}/${ARCHIVE}", | ||
) | ||
EOF | ||
|
||
echo "\`\`\`" |
This file was deleted.
Oops, something went wrong.