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}" .