File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -o errexit -o nounset -o pipefail
4+
5+ # Argument provided by reusable workflow caller, see
6+ # https://github.com/bazel-contrib/.github/blob/d197a6427c5435ac22e56e33340dff912bc9334e/.github/workflows/release_ruleset.yaml#L72
7+ TAG=$1
8+
9+ PREFIX=" rules_vulkan-${TAG: 1} "
10+ ARCHIVE=" rules_vulkan-$TAG .tar.gz"
11+
12+ # NB: configuration for 'git archive' is in /.gitattributes
13+ git archive --format=tar --prefix=${PREFIX} / ${TAG} | gzip > $ARCHIVE
14+ SHA=$( shasum -a 256 $ARCHIVE | awk ' {print $1}' )
15+
16+ cat << EOF
17+ ## Using Bzlmod with Bazel 6 or greater
18+
19+ 1. (Bazel 6 only) Enable with \` common --enable_bzlmod\` in \` .bazelrc\` .
20+ 2. Add to your \` MODULE.bazel\` file:
21+
22+ \`\`\` starlark
23+ bazel_dep(name = "rules_vulkan", version = "${TAG: 1} ")
24+ \`\`\`
25+
26+ ## Using WORKSPACE
27+
28+ Paste this snippet into your \` WORKSPACE.bazel\` file:
29+
30+ \`\`\` starlark
31+ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
32+ http_archive(
33+ name = "com_myorg_rules_mylang",
34+ sha256 = "${SHA} ",
35+ strip_prefix = "${PREFIX} ",
36+ url = "https://github.com/mxpv/rules_vulkan/releases/download/${TAG} /${ARCHIVE} ",
37+ )
38+ EOF
39+
40+ echo " \`\`\` "
You can’t perform that action at this time.
0 commit comments