SKALE-2202 fix codacy warnings

parent c52f1df5
...@@ -4,19 +4,19 @@ BRANCH=$1 ...@@ -4,19 +4,19 @@ BRANCH=$1
VERSION=$2 VERSION=$2
CONTAINER=$3 CONTAINER=$3
if [ -z $BRANCH ] if [ -z "$BRANCH" ]
then then
echo "A branch is not set." echo "A branch is not set."
exit 1 exit 1
fi fi
if [ -z $VERSION ] if [ -z "$VERSION" ]
then then
echo "The base version is not set." echo "The base version is not set."
exit 1 exit 1
fi fi
if [ -z $CONTAINER ] if [ -z "$CONTAINER" ]
then then
echo "The base container is not set." echo "The base container is not set."
exit 1 exit 1
...@@ -24,17 +24,17 @@ fi ...@@ -24,17 +24,17 @@ fi
git fetch --tags git fetch --tags
if [ $BRANCH = "master" ] if [ "$BRANCH" = "master" ]
then then
echo $VERSION echo "$VERSION"
exit 0 exit 0
fi fi
LABEL="develop" LABEL="develop"
if [ $BRANCH = "stable" ] if [ "$BRANCH" = "stable" ]
then then
LABEL="stable" LABEL="stable"
elif [ $BRANCH = "beta" ] elif [ "$BRANCH" = "beta" ]
then then
LABEL="beta" LABEL="beta"
fi fi
...@@ -42,9 +42,9 @@ fi ...@@ -42,9 +42,9 @@ fi
for (( VERSION_NUMBER=0; ; VERSION_NUMBER++ )) for (( VERSION_NUMBER=0; ; VERSION_NUMBER++ ))
do do
RESULT_VERSION="$CONTAINER:$VERSION-$LABEL.$VERSION_NUMBER" RESULT_VERSION="$CONTAINER:$VERSION-$LABEL.$VERSION_NUMBER"
if ! [ $(git tag -l ?$RESULT_VERSION) ] if ! [ "$(git tag -l ?"$RESULT_VERSION")" ]
then then
echo $RESULT_VERSION echo "$RESULT_VERSION"
break break
fi fi
done done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment