Skip to content

Commit

Permalink
bazel/release: Fixes for versions hashing (envoyproxy#36630)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <[email protected]>
  • Loading branch information
phlax authored Oct 16, 2024
1 parent 1ef4303 commit c811a88
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
15 changes: 4 additions & 11 deletions bazel/generate_release_hash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,9 @@

set -e -o pipefail

ENVOY_SRCDIR="${1}"

if [[ ! -e "$ENVOY_SRCDIR" ]]; then
echo "Unable to find Envoy src dir: ${ENVOY_SRCDIR}" >&2
exit 1
fi

git -C "$ENVOY_SRCDIR" fetch --tags

git -C "$ENVOY_SRCDIR" tag --list 'v[0-9]*.[0-9]*.[0-9]*' \
| grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' \
git ls-remote --tags https://github.com/envoyproxy/envoy \
| grep -E 'refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$' \
| sort -u \
| sha256sum
| sha256sum \
| cut -d ' ' -f 1
8 changes: 4 additions & 4 deletions bazel/repo.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ envoy_entry_point(
sh_binary(
name = "generate_release_hash",
srcs = ["generate_release_hash.sh"],
srcs = ["@envoy//bazel:generate_release_hash.sh"],
visibility = ["//visibility:public"],
)
Expand All @@ -80,11 +80,11 @@ genrule(
name = "default_release_hash",
outs = ["default_release_hash.txt"],
cmd = """
$(location @envoy//bazel:generate_release_hash.sh) %s > $@
""" % PATH,
$(location @envoy_repo//:generate_release_hash) > $@
""",
stamp = True,
tags = ["no-remote-exec"],
tools = ["@envoy//bazel:generate_release_hash.sh"],
tools = ["@envoy_repo//:generate_release_hash"],
)
label_flag(
Expand Down

0 comments on commit c811a88

Please sign in to comment.