mirror of
https://github.com/clearlinux/dockerfiles.git
synced 2026-09-04 20:51:32 +00:00
Add return value check for tagging
Signed-off-by: Qi Zheng <qi.zheng@intel.com>
This commit is contained in:
+1
-2
@@ -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)
|
||||
|
||||
@@ -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%%.*}
|
||||
|
||||
Reference in New Issue
Block a user