-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathrelease_prep.sh
More file actions
executable file
·37 lines (27 loc) · 933 Bytes
/
Copy pathrelease_prep.sh
File metadata and controls
executable file
·37 lines (27 loc) · 933 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env bash
set -o errexit -o nounset -o pipefail
TAG=$1
PREFIX="sign-here-${TAG:1}"
ARCHIVE="sign-here-${TAG}.tar.gz"
git archive --format=tar --prefix=${PREFIX}/ ${TAG} | gzip > $ARCHIVE
SHA=$(shasum -a 256 $ARCHIVE | awk '{print $1}')
bazelisk build //Sources/SignHereTool:sign-here -c opt --macos_cpus=arm64
cp bazel-bin/Sources/SignHereTool/sign-here "sign-here-${TAG}-darwin-arm64"
cat << EOF
## Using Bzlmod with Bazel 6 or greater
Add to your \`MODULE.bazel\` file:
\`\`\`starlark
bazel_dep(name = "sign-here", version = "${TAG:1}")
\`\`\`
## Using WORKSPACE
Paste this snippet into your \`WORKSPACE.bazel\` file:
\`\`\`starlark
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "com_github_tinder_sign_here",
sha256 = "${SHA}",
strip_prefix = "${PREFIX}",
url = "https://github.com/Tinder/sign-here/releases/download/${TAG}/${ARCHIVE}",
)
\`\`\`
EOF