feat: new bun_build and bun_compile, extend bun_install
This commit is contained in:
@@ -121,3 +121,10 @@ sh_test(
|
||||
"//conditions:default": ["@bun_linux_x64//:bun"],
|
||||
}),
|
||||
)
|
||||
|
||||
sh_test(
|
||||
name = "bun_install_install_flags_shape_test",
|
||||
srcs = ["install_flags_shape.sh"],
|
||||
args = ["$(location //internal:bun_install.bzl)"],
|
||||
data = ["//internal:bun_install.bzl"],
|
||||
)
|
||||
|
||||
@@ -5,7 +5,7 @@ bun_path="$1"
|
||||
workdir="$(mktemp -d)"
|
||||
trap 'rm -rf "${workdir}"' EXIT
|
||||
|
||||
cat > "${workdir}/package.json" <<'JSON'
|
||||
cat >"${workdir}/package.json" <<'JSON'
|
||||
{
|
||||
"name": "clean-install-test",
|
||||
"version": "1.0.0"
|
||||
|
||||
@@ -7,3 +7,4 @@ grep -Eq 'install_args = \[str\(bun_bin\), "--bun", "install", "--frozen-lockfil
|
||||
grep -Eq 'if repository_ctx\.attr\.isolated_home:' "${rule_file}"
|
||||
grep -Eq 'environment[[:space:]]*=[[:space:]]*\{"HOME":[[:space:]]*str\(repository_ctx\.path\("\."\)\)\}' "${rule_file}"
|
||||
grep -Eq '"isolated_home": attr\.bool\(default = True\)' "${rule_file}"
|
||||
grep -Eq '"install_flags": attr\.string_list\(\)' "${rule_file}"
|
||||
|
||||
16
tests/install_test/install_flags_shape.sh
Executable file
16
tests/install_test/install_flags_shape.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
rule_file="$1"
|
||||
|
||||
grep -Fq 'repository_ctx.attr.production' "${rule_file}"
|
||||
grep -Fq '"--production"' "${rule_file}"
|
||||
grep -Fq 'for omit in repository_ctx.attr.omit' "${rule_file}"
|
||||
grep -Fq '"--omit"' "${rule_file}"
|
||||
grep -Fq 'repository_ctx.attr.linker' "${rule_file}"
|
||||
grep -Fq '"--linker"' "${rule_file}"
|
||||
grep -Fq 'repository_ctx.attr.backend' "${rule_file}"
|
||||
grep -Fq '"--backend"' "${rule_file}"
|
||||
grep -Fq 'repository_ctx.attr.ignore_scripts' "${rule_file}"
|
||||
grep -Fq '"--ignore-scripts"' "${rule_file}"
|
||||
grep -Fq 'repository_ctx.attr.install_flags' "${rule_file}"
|
||||
Reference in New Issue
Block a user