From 59ab85fbf9f1e28e1e1afa40cc8c1657e7720629 Mon Sep 17 00:00:00 2001 From: Manuel de Brito Fontes Date: Mon, 4 Dec 2017 11:42:56 -0300 Subject: [PATCH] Fix grep in travis-ci to match the version as a word [ci skip] --- .travis/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis/common.sh b/.travis/common.sh index 05d1b3c81f..3417f05179 100755 --- a/.travis/common.sh +++ b/.travis/common.sh @@ -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