Skip to content

Commit

Permalink
chore: updates for bzlmod launch
Browse files Browse the repository at this point in the history
- we are broken on windows, #228
- add the snippet so our next release shows how to use from BCR
  • Loading branch information
alexeagle committed Nov 4, 2022
1 parent 7976108 commit 5264396
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/bcr/presubmit.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
bcr_test_module:
module_path: 'e2e/bzlmod'
matrix:
platform: ['debian10', 'macos', 'ubuntu2004', 'windows']
# TODO(aspect-team): windows https://github.com/aspect-build/rules_ts/issues/228
platform: ['debian10', 'macos', 'ubuntu2004']
tasks:
run_tests:
name: 'Run test module'
Expand Down
27 changes: 26 additions & 1 deletion .github/workflows/workspace_snippet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,32 @@ PREFIX="rules_ts-${TAG:1}"
SHA=$(git archive --format=tar --prefix=${PREFIX}/ ${TAG} | gzip | shasum -a 256 | awk '{print $1}')

cat << EOF
WORKSPACE snippet:
## Using Bzlmod with Bazel 6:
Add to your \`MODULE.bazel\` file:
\`\`\`starlark
bazel_dep(name = "aspect_rules_ts", version = "${TAG:1}")
rules_ts_ext = use_extension(
"@aspect_rules_ts//ts:extensions.bzl",
"ext",
dev_dependency = True,
)
rules_ts_ext.deps()
use_repo(rules_ts_ext, "npm_typescript")
use_repo(rules_ts_ext, "npm_google_protobuf")
use_repo(rules_ts_ext, "npm_at_bazel_worker")
\`\`\`
## Using WORKSPACE
Paste this snippet into your \`WORKSPACE\` file:
\`\`\`starlark
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
Expand Down

0 comments on commit 5264396

Please sign in to comment.