Skip to content

Commit

Permalink
Add rules_shell in advance of Protobuf 29.0+ update. (#37595)
Browse files Browse the repository at this point in the history
`rules_shell` is new, and currently largely delegates back to the bazel
native `sh_binary`, `sh_library`, and `sh_test`.

Protobuf 29.0+ explicitly depends on it, though BCR[^1] suggests a lot
of other things do too, so we'll load it just before `rules_cc`.

[^1]: https://registry.bazel.build/modules/rules_shell/0.3.0

Risk Level: low
Testing: CI

Signed-off-by: Alejandro R. Sedeño <[email protected]>
  • Loading branch information
asedeno authored Dec 10, 2024
1 parent 6445d0d commit f5663c1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ def envoy_dependencies(skip_targets = []):
if "envoy_build_config" not in native.existing_rules().keys():
_default_envoy_build_config(name = "envoy_build_config")

# Setup Bazel shell rules
external_http_archive(name = "rules_shell")

# Setup Bazel C++ rules
external_http_archive("rules_cc")

Expand Down
13 changes: 13 additions & 0 deletions bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1120,6 +1120,19 @@ REPOSITORY_LOCATIONS_SPEC = dict(
license = "Apache-2.0",
license_url = "https://github.com/bazelbuild/rules_pkg/blob/{version}/LICENSE",
),
rules_shell = dict(
project_name = "Shell script rules for Bazel",
project_desc = "Bazel rules for shell scripts",
project_url = "https://github.com/bazelbuild/rules_shell",
version = "0.3.0",
sha256 = "d8cd4a3a91fc1dc68d4c7d6b655f09def109f7186437e3f50a9b60ab436a0c53",
strip_prefix = "rules_shell-0.3.0",
urls = ["https://github.com/bazelbuild/rules_shell/releases/download/v0.3.0/rules_shell-v0.3.0.tar.gz"],
use_category = ["build"],
release_date = "2024-11-06",
license = "Apache-2.0",
license_url = "https://github.com/protocolbuffers/rules_shell/blob/{version}/LICENSE",
),
com_github_wamr = dict(
project_name = "Webassembly Micro Runtime",
project_desc = "A standalone runtime with a small footprint for WebAssembly",
Expand Down

0 comments on commit f5663c1

Please sign in to comment.