vegvisir/test.sh

29 lines
689 B
Bash
Raw Normal View History

#!/bin/sh
set -e
set -x
# BRANCH="dev/ci-docker-builder"
BRANCH=$CI_COMMIT_BRANCH
simple=$(echo $BRANCH | grep -v '/') || echo $BRANCH
p1=$(echo $BRANCH | cut -d '/' -f1 -s)
p2=$(echo $BRANCH | cut -d '/' -f2 -s)
tag=${simple:-$p1-$p2}
echo $tag
# p1=$(echo "develop" | grep -s '/') && echo "1: $p1"
# p2=$(echo "develop/fix" | grep -s '/') && echo "2: $p2"
# p3=$(echo "develop" | grep -s -v '/') && echo "3: $p3"
# p4=$(echo "develop/fix" | grep -s -v '/') && echo "4: $p4"
# echo $p1 $p2 $p3 $p4
# echo "DONE"
#simple=$(echo $BRANCH | grep -v '/') ;
#p1=$(echo $BRANCH | cut -d '/' -f1 -s) ;
#p2=$(echo $BRANCH | cut -d '/' -f2 -s) ;
#tag=${simple:=$p1-$p2} &&
#echo "TAG:" $tag