Skip to content

Commit

Permalink
bazel/repo: Fix version export (for apt archive) (#36644)
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 424a90d commit ca6f4d6
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 14 deletions.
1 change: 0 additions & 1 deletion bazel/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ envoy_package()

exports_files([
"gen_sh_test_runner.sh",
"generate_release_hash.sh",
"sh_test_wrapper.sh",
"test_for_benchmark_wrapper.sh",
"repository_locations.bzl",
Expand Down
10 changes: 0 additions & 10 deletions bazel/generate_release_hash.sh

This file was deleted.

24 changes: 21 additions & 3 deletions bazel/repo.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,27 @@ envoy_entry_point(
init_data = [":__init__.py"],
)
genrule(
name = "generate_release_hash_bin",
outs = ["generate_release_hash.sh"],
cmd = """
echo "
#!/usr/bin/env bash
set -e -o pipefail
git ls-remote --tags https://github.com/envoyproxy/envoy \\\\
| grep -E 'refs/tags/v[0-9]+\\\\.[0-9]+\\\\.[0-9]+$$' \\\\
| sort -u \\\\
| sha256sum \\\\
| cut -d ' ' -f 1" > $@
chmod +x $@
"""
)
sh_binary(
name = "generate_release_hash",
srcs = ["@envoy//bazel:generate_release_hash.sh"],
srcs = [":generate_release_hash_bin"],
visibility = ["//visibility:public"],
)
Expand All @@ -80,11 +98,11 @@ genrule(
name = "default_release_hash",
outs = ["default_release_hash.txt"],
cmd = """
$(location @envoy_repo//:generate_release_hash) > $@
$(location :generate_release_hash) > $@
""",
stamp = True,
tags = ["no-remote-exec"],
tools = ["@envoy_repo//:generate_release_hash"],
tools = [":generate_release_hash"],
)
label_flag(
Expand Down
1 change: 1 addition & 0 deletions tools/code/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ genrule(
-l warn \
-v warn \
-x mobile/dist/envoy-pom.xml \
-x bazel/repo.bzl \
--codeowners=$(location //:CODEOWNERS) \
--owners=$(location //:OWNERS.md) \
--extensions_build_config=$(location :extensions_build_config) \
Expand Down

0 comments on commit ca6f4d6

Please sign in to comment.