Skip all template actions unless --forceUpdateTemplate is provided

This commit is contained in:
J0Z1L 2026-02-28 00:58:55 +01:00
parent cc580600ae
commit a42e5e2542
2 changed files with 18 additions and 1 deletions

View file

@ -1,6 +1,15 @@
#!/usr/bin/env bash
set -euo pipefail
FORCE_UPDATE_TEMPLATE=0
for arg in "$@"; do
case "${arg}" in
--forceUpdateTemplate)
FORCE_UPDATE_TEMPLATE=1
;;
esac
done
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
@ -72,6 +81,14 @@ if [[ "${PUSH_IMAGE}" == "1" ]]; then
fi
mkdir -p "${TEMPLATE_DIR}"
if [[ "${FORCE_UPDATE_TEMPLATE}" != "1" ]]; then
echo "==> Template-Schritt übersprungen (nutze --forceUpdateTemplate)"
echo "==> Fertig"
echo "Image: ${IMAGE}"
echo "Template (unveraendert): ${TEMPLATE_PATH}"
exit 0
fi
TMP_TEMPLATE="$(mktemp)"
trap 'rm -f "${TMP_TEMPLATE}"' EXIT