From 0ca32aa2ae2ee32c21fa4f0c013dc0056e188da7 Mon Sep 17 00:00:00 2001 From: Nils Freydank Date: Sun, 1 Oct 2023 19:35:23 +0200 Subject: [PATCH] Re-order tagging and tag cleanup --- build-image.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/build-image.sh b/build-image.sh index 11c1140..3556920 100755 --- a/build-image.sh +++ b/build-image.sh @@ -44,6 +44,7 @@ PODMAN_BUILD_ARGS=( --platform "${OCI_ARCH}" # Tag the generated image. -t "${IMAGE_TAG}" + -t "latest" # Label the image. --label="gentoo-nfr-${IMAGE_TAG}" # Sign the image. @@ -72,14 +73,11 @@ _mkdir "${LOGDIR}" # === Fetch the base image. podman pull gentoo/stage3:amd64-nomultilib-systemd || exit_err "Could not fetch the image." -# === Build the new image. -podman build "${PODMAN_BUILD_ARGS[@]}" || exit_err "Build failed." - # === Remove the old tag 'latest'. podman tag rm "${REGISTRY}:latest" # Do not exit_err here. At least on first run # there is no latest tag to delete. -# === Tage the new image as 'latest'. -podman tag "${REGISTRY}:${VERSION}" "${REGISTRY}:latest" || exit_err "Could not tag new image as 'latest'." +# === Build the new image. +podman build "${PODMAN_BUILD_ARGS[@]}" || exit_err "Build failed." # vim:fileencoding=utf-8:ts=4:syntax=bash:expandtab