config: fix for release.sh to be fail fast if release info is not defined

This commit is contained in:
Roman Ivanov 2016-09-05 07:33:05 -07:00
parent c9eab97c07
commit be4fb16956
1 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
set -e
# Make sure you prepared your PC for automative deployment
@ -11,6 +11,15 @@ PREV_RELEASE=$(git describe $(git rev-list --tags --max-count=1) | sed "s/checks
echo "PREVIOUS RELEASE version:"$PREV_RELEASE
echo "RELEASE version:"$RELEASE
if [[ -z $RELEASE ]]; then
echo "Problem to calculate release version."
exit 1
fi
if [[ -z $PREV_RELEASE ]]; then
echo "Problem to calculate previous release version."
exit 1
fi
#############################
echo "Please provide password for $SF_USER,checkstyle@shell.sourceforge.net"
echo "exit" | ssh -t $SF_USER,checkstyle@shell.sourceforge.net create