Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bazel/repo: Fix version export (for apt archive) #36644

Merged
merged 2 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 2 additions & 0 deletions tools/code/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ genrule(
-l warn \
-v warn \
-x mobile/dist/envoy-pom.xml \
# shellcheck thinks this is a shell script
-x bazel/repo.bzl \
--codeowners=$(location //:CODEOWNERS) \
--owners=$(location //:OWNERS.md) \
--extensions_build_config=$(location :extensions_build_config) \
Expand Down