Skip to content

Commit

Permalink
Ensure Bazel rules are updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ileitch committed Dec 14, 2024
1 parent 77400f5 commit 48cf24d
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 48cf24d

Please sign in to comment.