rename var
This commit is contained in:
parent
bee1136fd4
commit
3c7f3e5cd4
1 changed files with 3 additions and 3 deletions
|
@ -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}" .
|
||||
|
|
Loading…
Reference in a new issue