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+ #! /bin/bash
2+ # This file is used to prepare the release.
3+ # It is not intended to be run directly but called from the github release
4+ # workflow.
5+ tag=" $1 "
6+ # The prefix is used to determine the directory structure of the archive. We strip the 'v'
7+ # prefix from the version number.
8+ directory=" j2cl-${tag# v} "
9+ archive=" j2cl-${tag} .tar.gz"
10+
11+ git archive --format=tar --prefix=${directory} / -o " ${archive} " ${tag}
12+
13+ sha256=$( shasum -a 256 $ARCHIVE | awk ' {print $1}' )
14+
15+ # The stdout of this program will be used as the top of the release notes for this release.
16+ cat << EOF
17+ ## Using bzlmod with Bazel 6 or later:
18+
19+ 1. [Bazel 6] Add \` common --enable_bzlmod\` to \` .bazelrc\` .
20+
21+ 2. Add to your \` MODULE.bazel\` file:
22+
23+ \`\`\` starlark
24+ bazel_dep(
25+ name = "j2cl",
26+ repo_name = "com_google_j2cl",
27+ version = "${tag} ")
28+ \`\`\`
29+
30+ ## Using WORKSPACE:
31+
32+ \`\`\` starlark
33+
34+ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
35+
36+ http_archive(
37+ name = "j2cl",
38+ sha256 = "${sha256} ",
39+ strip_prefix = "${directory} ",
40+ url = "https://github.com/bazelbuild/j2cl/releases/download/${tag} /${archive} ",
41+ )
42+
43+ \`\`\`
44+ EOF
You can’t perform that action at this time.
0 commit comments