Skip to content

Commit 3272e90

Browse files
feat: allow bazel-bob-update-config.exe on the command line
Allows passing in the Bazel target to perform the configuration. Signed-off-by: Brandon Jones <brandon.jones@arm.com> Change-Id: I89412bc3df961a6e673ad4497d17dd81e12168e4
1 parent ebe3f85 commit 3272e90

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

config.bash

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,16 @@ done
3333
# Move to the working directory
3434
cd -P "${WORKDIR}"
3535

36+
# Allow passed in `update_config`
37+
if command -v bazel-bob-update-config.exe &> /dev/null
38+
then
39+
UPDATE_CONFIG=bazel-bob-update-config.exe
40+
else
41+
UPDATE_CONFIG="${BOB_DIR}/config_system/update_config.py"
42+
fi
43+
3644
# shellcheck disable=SC2294
37-
eval "${BOB_DIR}/config_system/update_config.py" --new -d "${SRCDIR}/Mconfig" \
45+
eval "${UPDATE_CONFIG}" --new -d "${SRCDIR}/Mconfig" \
3846
"${BOB_CONFIG_OPTS}" "${BOB_CONFIG_PLUGIN_OPTS}" \
3947
-j "${CONFIG_JSON}" \
4048
-c "${CONFIG_FILE}" \

config_system/BUILD.bazel

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
load("@bazel_skylib//rules:native_binary.bzl", "native_binary")
12
load("@config_deps//:requirements.bzl", "requirement")
23

34
exports_files(
@@ -55,6 +56,12 @@ py_binary(
5556
deps = ["//config_system"],
5657
)
5758

59+
native_binary(
60+
name = "bazel-bob-update-config",
61+
src = "update_config",
62+
visibility = ["//visibility:public"],
63+
)
64+
5865
py_binary(
5966
name = "get_configs_gazelle",
6067
srcs = ["get_configs_gazelle.py"],

0 commit comments

Comments
 (0)