From 3c7f3e5cd44a6ad018eb6ed8e903c1b8dd00ae46 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Sat, 19 Jul 2025 13:14:17 +0300 Subject: [PATCH] rename var --- podman_push.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/podman_push.sh b/podman_push.sh index 6dd7c5a..06e33c6 100755 --- a/podman_push.sh +++ b/podman_push.sh @@ -3,12 +3,12 @@ script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) repo="$(basename "${script_dir}")" tag="${1}" if [ -z "${tag}" ]; then - git_reference=$(git describe --exact-match --tags) - if [ "${git_reference}" == 'master' ] || [ "${git_reference}" == 'main' ] || [ -z "${git_reference}" ]; then + git_tag=$(git describe --exact-match --tags) + if [ "${git_tag}" == 'master' ] || [ "${git_tag}" == 'main' ] || [ -z "${git_tag}" ]; then echo "Change to a different git reference not 'master/main', since it will be used as tag for the container. Or pass a tag name as only parameter." exit 1 fi - tag="${git_reference}" + tag="${git_tag}" fi echo "Building '${repo}:${tag}'..." podman build --tag "${repo}:${tag}" .