Skip to content

Commit 72ebc09

Browse files
committed
fix: fix toolchains issue and maintainers
1 parent d8d0e3a commit 72ebc09

12 files changed

Lines changed: 139 additions & 45 deletions

File tree

.bcr/metadata.template.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"homepage": "https://github.com/formatjs/rules_formatjs",
3-
"maintainers": [],
3+
"maintainers": [
4+
{
5+
"email": "long@lho.dev",
6+
"github": "longlho",
7+
"name": "Long Ho"
8+
}
9+
],
410
"repository": ["github:formatjs/rules_formatjs"],
511
"versions": [],
612
"yanked_versions": {}

.github/workflows/release.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,9 @@ jobs:
3636
uses: ./.github/workflows/publish.yaml
3737
with:
3838
tag_name: ${{ inputs.tag_name || github.ref_name }}
39+
permissions:
40+
attestations: write
41+
contents: write
42+
id-token: write
3943
secrets:
4044
publish_token: ${{ secrets.publish_token || secrets.BCR_PUBLISH_TOKEN }}

.github/workflows/release_prep.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,5 @@ cat << EOF
3333
bazel_dep(name = "rules_formatjs", version = "${TAG:1}")
3434
\`\`\`
3535
36+
That's it! The toolchains are automatically registered.
3637
EOF
37-
38-
awk 'f;/--SNIP--/{f=1}' examples/simple/MODULE.bazel
39-
echo "\`\`\`"

MODULE.bazel

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,11 @@ formatjs_cli = use_extension("//formatjs_cli:extensions.bzl", "formatjs_cli")
5252
formatjs_cli.toolchain(version = "0.1.2")
5353
use_repo(
5454
formatjs_cli,
55+
"formatjs_cli_toolchains",
5556
"formatjs_cli_toolchains_darwin_arm64",
5657
"formatjs_cli_toolchains_linux_x64",
5758
)
5859

59-
register_toolchains("@formatjs_cli_toolchains_darwin_arm64//:toolchain")
60-
61-
register_toolchains("@formatjs_cli_toolchains_linux_x64//:toolchain")
60+
# Register all toolchains - Bazel will automatically select the appropriate one
61+
# based on exec_compatible_with constraints
62+
register_toolchains("@formatjs_cli_toolchains//:all")

MODULE.bazel.lock

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/aggregate/MODULE.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ local_path_override(
1616
path = "../..",
1717
)
1818

19+
# Test utilities (not required by rules_formatjs users)
1920
bazel_dep(name = "aspect_bazel_lib", version = "2.22.2")

examples/aggregate/MODULE.bazel.lock

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/simple/MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ local_path_override(
1111
path = "../..",
1212
)
1313

14-
# --SNIP-- (Below here is the generated documentation)
14+
# Test utilities (not required by rules_formatjs users)
1515
bazel_dep(name = "aspect_bazel_lib", version = "2.22.2")

examples/simple/MODULE.bazel.lock

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

formatjs_cli/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ toolchain_type(
99
alias(
1010
name = "cli",
1111
actual = select({
12-
"@platforms//os:macos": "@formatjs_cli_toolchains_darwin_arm64//:cli",
12+
"@platforms//os:osx": "@formatjs_cli_toolchains_darwin_arm64//:cli",
1313
"@platforms//os:linux": "@formatjs_cli_toolchains_linux_x64//:cli",
1414
}),
1515
visibility = ["//visibility:public"],

0 commit comments

Comments
 (0)