Skip to content

Commit

Permalink
run_zaptool and configure tweaks (#30573)
Browse files Browse the repository at this point in the history
configure: warn if running with an active PW environment
run_zaptool: default ZAP_INSTALL_PATH to PW_ZAP_CIPD_INSTALL_DIR
  • Loading branch information
ksperling-apple authored and pull[bot] committed Dec 15, 2023
1 parent 0c53acb commit 4614099
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/configure
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ function main() { # ...
[[ -n "$PROJECT_PATH" && -r "${PROJECT_PATH}/.gn" ]] || fail "Invalid project '${PROJECT}' - missing .gn at '${PROJECT_PATH}'"
fi

if [[ -n "$PW_ROOT" ]]; then
info "WARNING: A Pigweed environment appears to be active, this is usually a misconfiguration."
fi

check_binary gn GN
check_binary ninja NINJA

Expand Down Expand Up @@ -149,7 +153,7 @@ function create_empty_pw_env() {
info "Creating empty $gni in source tree"
echo "# ${CONFIGURE_MARKER}" >"${CHIP_ROOT}/${gni}"
else
info "Warning: Leaving existing $gni in place, this might affect the build configuration."
info "WARNING: Leaving existing $gni in place, this might affect the build configuration."
fi
fi
}
Expand Down
4 changes: 4 additions & 0 deletions scripts/tools/zap/run_zaptool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ SCRIPT_PATH="$(_get_fullpath "$0")"
CHIP_ROOT="${SCRIPT_PATH%/scripts/tools/zap/run_zaptool.sh}"
[[ -n "$1" ]] && ZAP_ARGS="-i \"$(_get_fullpath "$1")\"" || ZAP_ARGS=""

if [[ -z "$ZAP_INSTALL_PATH" && -n "$PW_ZAP_CIPD_INSTALL_DIR" ]]; then
ZAP_INSTALL_PATH="$PW_ZAP_CIPD_INSTALL_DIR"
fi

if [ ! -z "$ZAP_DEVELOPMENT_PATH" ]; then
WORKING_DIR=$ZAP_DEVELOPMENT_PATH
ZAP_CMD="node src-script/zap-start.js"
Expand Down

0 comments on commit 4614099

Please sign in to comment.