2
0
Fork 0
mirror of https://github.com/bazelbuild/bazel-skylib synced 2024-12-03 17:52:40 +00:00
bazel-skylib/tests/common_settings/BUILD
Alexandre Rostovtsev 0d43695bd5
Re-add licenses() - internal license checker still requires it :/ (#506)
And take the opportunity to fix default_applicable_licenses in the gazelle plugin
2024-05-02 14:38:05 -04:00

33 lines
651 B
Python

load("//rules:common_settings.bzl", "int_flag", "string_flag")
package(
default_applicable_licenses = ["//:license"],
default_testonly = 1,
)
licenses(["notice"])
int_flag(
name = "my_int_flag",
build_setting_default = 42,
make_variable = "MY_INT_FLAG",
)
string_flag(
name = "my_string_flag",
build_setting_default = "foo",
make_variable = "MY_STRING_FLAG",
)
sh_test(
name = "make_variable_test",
srcs = ["make_variable_test.sh"],
env = {
"MESSAGE": "Hello, $(MY_STRING_FLAG)! My name is $(MY_INT_FLAG).",
},
toolchains = [
":my_int_flag",
":my_string_flag",
],
)