From ececefc5a463d195fbda228a6c889e970d9a6f9c Mon Sep 17 00:00:00 2001 From: rusefillc Date: Mon, 1 Apr 2024 10:59:48 -0400 Subject: [PATCH] only: "Upload not configured" should not fail --- firmware/bin/upload_bundle.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/firmware/bin/upload_bundle.sh b/firmware/bin/upload_bundle.sh index 97ce220a55..a975a62b02 100755 --- a/firmware/bin/upload_bundle.sh +++ b/firmware/bin/upload_bundle.sh @@ -5,20 +5,21 @@ PASS=$2 HOST=$3 BUNDLE_FILE_NAME=$4 -if [ -n "${BUNDLE_FILE_NAME}" ]; then - echo "BUNDLE_FILE_NAME is ${BUNDLE_FILE_NAME}" -else - echo "BUNDLE_FILE_NAME argument not specified" - exit 1 -fi - SCRIPT_NAME=$(basename "$0") -# technical debt: more than one file uses magic 'rusefi_bundle_' constant, can we extract constant? -FULL_BUNDLE_FILE="rusefi_bundle_${BUNDLE_FILE_NAME}.zip" -UPDATE_BUNDLE_FILE="rusefi_bundle_${BUNDLE_FILE_NAME}_autoupdate.zip" if [ -n "${USER}" -a -n "$PASS" -a -n "${HOST}" ]; then echo "$SCRIPT_NAME: Uploading both bundles" + + if [ -n "${BUNDLE_FILE_NAME}" ]; then + echo "BUNDLE_FILE_NAME is ${BUNDLE_FILE_NAME}" + else + echo "BUNDLE_FILE_NAME argument not specified" + exit 1 + fi + # technical debt: more than one file uses magic 'rusefi_bundle_' constant, can we extract constant? + FULL_BUNDLE_FILE="rusefi_bundle_${BUNDLE_FILE_NAME}.zip" + UPDATE_BUNDLE_FILE="rusefi_bundle_${BUNDLE_FILE_NAME}_autoupdate.zip" + RET=0 if [ "$LTS" == "true" -a -n "$REF" ]; then DESTINATION_FOLDER="build_server/lts/${REF}"