Make regex more specific to probable tags
@@ -22,9 +22,10 @@ base_dir="$(cd "$(dirname "$0")/.." ; pwd)"
dockerfile_dir="${base_dir}/images/federation-v2"
[ -f "$base_dir/bin/controller-manager" ] || { echo "$base_dir/bin/controller-manager not found" ; exit 1 ;}
+
echo "travis tag: ${TRAVIS_TAG}"
echo "travis branch:${TRAVIS_BRANCH}"
-if [[ "${TRAVIS_TAG}" =~ ^[0-9]+\.[0-9]+\.[0-9]?\d* ]]; then
+if [[ "${TRAVIS_TAG}" =~ ^[0-9]+\.[0-9]+\.[0-9]?\d+([-a-zA-Z0-9-]*)? ]]; then
echo "Pushing images with tag '${TRAVIS_TAG}'."
TAG="${TRAVIS_TAG}"
elif [[ "${TRAVIS_BRANCH}" == "master" ]]; then
