Skip to content

Commit

Permalink
Automatically update versions in MODULE.bazel
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthab committed Sep 14, 2023
1 parent df8ee5a commit e4fad4e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/release_prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

set -o errexit -o nounset -o pipefail

git config user.email "you@example.com"
git config user.name "Your Name"

# Set by GH actions, see
# https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
tag=${GITHUB_REF_NAME}
# The prefix is chosen to match what GitHub generates for source archives
prefix="toolchains_llvm-${tag}"
archive="toolchains_llvm-${tag}.tar.gz"
git archive --format=tar --prefix="${prefix}/" "${tag}" | gzip >"${archive}"
sed -i.bak "s/0.0.0/${tag}/" MODULE.bazel && git add MODULE.bazel && git commit -m "Update version" >/dev/null
git archive --format=tar --prefix="${prefix}/" HEAD | gzip >"${archive}"
sha=$(shasum -a 256 "${archive}" | cut -f1 -d' ')

sed \
Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

module(
name = "toolchains_llvm",
version = "0.10.0",
version = "0.0.0",
compatibility_level = 0,
)

Expand Down

0 comments on commit e4fad4e

Please sign in to comment.