fix: update image handling in build script to use AZURITE_IMAGE variable consistently

This commit is contained in:
2026-03-24 10:23:32 +01:00
parent 8c454fa2fc
commit 8800154d37

View File

@@ -4,6 +4,7 @@ ARCH=()
VERSION_ARG=() VERSION_ARG=()
VERSION="" VERSION=""
REGISTRY="" REGISTRY=""
AZURITE_IMAGE="${AZURITE_IMAGE:-azurite:latest}"
while [[ $# -gt 0 ]]; do while [[ $# -gt 0 ]]; do
case "$1" in case "$1" in
@@ -33,18 +34,17 @@ while [[ $# -gt 0 ]]; do
esac esac
done done
if [[ -z "$REGISTRY" ]]; then if [[ ! -z "$REGISTRY" ]]; then
IMAGE="azurite" # Prepend the registry to the image name for tagging.
else AZURITE_IMAGE="$REGISTRY/${AZURITE_IMAGE#*/}"
IMAGE="$REGISTRY/azurite"
fi fi
if [[ -z "$VERSION" ]]; then if [[ -z "$VERSION" ]]; then
TAG_ARGS=("--tag" "$IMAGE:latest") TAG_ARGS=("--tag" "${AZURITE_IMAGE%:*}:latest")
elif [[ "$VERSION" == "latest" ]]; then elif [[ "$VERSION" == "latest" ]]; then
TAG_ARGS=("--tag" "$IMAGE:${LATEST_TAG#v}" "--tag" "$IMAGE:latest") TAG_ARGS=("--tag" "${AZURITE_IMAGE%:*}:${LATEST_TAG#v}" "--tag" "${AZURITE_IMAGE%:*}:latest")
else else
TAG_ARGS=("--tag" "$IMAGE:${VERSION#v}") TAG_ARGS=("--tag" "${AZURITE_IMAGE%:*}:${VERSION#v}")
fi fi
echo "Effective command line arguments:" ${ARCH[@]} ${VERSION_ARG[@]} ${TAG_ARGS[@]} echo "Effective command line arguments:" ${ARCH[@]} ${VERSION_ARG[@]} ${TAG_ARGS[@]}