diff --git a/docker-hooks.sh b/docker-hooks.sh index 3d363d4..29b6dba 100644 --- a/docker-hooks.sh +++ b/docker-hooks.sh @@ -13,9 +13,8 @@ function get_tag { # no matches, return NULL tag if [ -z "$matches" ]; then - echo "" echo "no $pkg found on the release $clr_ver" - exit 0 + exit 1 fi matches=($matches) diff --git a/redis/hooks/post_push b/redis/hooks/post_push index 6e28a3d..f7a8e33 100755 --- a/redis/hooks/post_push +++ b/redis/hooks/post_push @@ -1,16 +1,13 @@ #!/bin/bash echo "=> Tagging the image" -set -e - . ../docker-hooks.sh image="clearlinux/redis" tag=$(get_tag redis-native) -if [ -z "$tag" ]; then - echo "no $pkg found on the release $clr_ver" -else +if [ $? -eq 0 ] && [ -n "$tag" ]; then + set -e docker tag $image:latest $image:$tag docker push $image:$tag major_tag=${tag%%.*}