fix getting git tag
This commit is contained in:
parent
8f8868c0cc
commit
bee1136fd4
1 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@ script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|||
repo="$(basename "${script_dir}")"
|
||||
tag="${1}"
|
||||
if [ -z "${tag}" ]; then
|
||||
git_reference=$(grep '^ref: ' .git/HEAD | awk 'BEGIN {FS="/"} {print($NF)}')
|
||||
git_reference=$(git describe --exact-match --tags)
|
||||
if [ "${git_reference}" == 'master' ] || [ "${git_reference}" == 'main' ] || [ -z "${git_reference}" ]; 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
|
||||
|
|
Loading…
Reference in a new issue