Skip to content

Commit

Permalink
Ensure Bazel rules are updated (#835)
Browse files Browse the repository at this point in the history
  • Loading branch information
ileitch authored Dec 14, 2024
1 parent 77400f5 commit cf3e59a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
name: Bazel
steps:
- uses: actions/checkout@master
- uses: jdx/mise-action@v2
- name: Check generated rules
run: mise r gen-bazel-rules && git diff --quiet --exit-code
- name: Scan
run: bazel run //:periphery -- scan --bazel --quiet --strict --baseline bazel/internal/bazel_baseline.json
macOS:
Expand Down
5 changes: 5 additions & 0 deletions .mise/tasks/gen-bazel-rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -euo pipefail

ruby .mise/tasks/gen_bazel_rules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def generate_bazel_rule(path, rule, name, attrs)

File.write("Sources/BUILD.bazel", <<~EOS)
load("@rules_swift//swift:swift.bzl", "swift_binary", "swift_library")
load("//bazel/internal:opt.bzl", "optimized_swift_binary")
load("//bazel/internal:opt.bzl", "optimized_swift_binary") # buildifier: disable=bzl-visibility
#{rules.join("\n\n")}
EOS
Expand Down

0 comments on commit cf3e59a

Please sign in to comment.