Merge pull request #1796 from aledbf/fix-grep-travis

Fix grep in travis-ci to match the version as a word [ci skip]
This commit is contained in:
Manuel Alejandro de Brito Fontes 2017-12-04 11:43:31 -03:00 committed by GitHub
commit 681663045e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,7 +82,7 @@ fi
function docker_tag_exists() {
TAG=${2//\"/}
IMAGES=$(curl -s -H "Authorization: Bearer ${QUAY_PASSWORD}" https://quay.io/api/v1/repository/$1-$3/image/ | jq '.images | sort_by(.sort_index) | .[] .tags | select(.[] !=null) | .[0]' | sed s/\"//g)
if echo "$IMAGES" | grep -wq "$TAG" ; then
if echo "$IMAGES" | grep -q -P "(^|\s)$TAG(?=\s|$)" ; then
return 0
fi