Skip to content

Commit

Permalink
Merge pull request #89 from kadel/check-version-on-release
Browse files Browse the repository at this point in the history
check if binary has correct version when doing release
  • Loading branch information
concaf authored Feb 14, 2018
2 parents bf1d895 + 4476007 commit 8d56bb3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ RELEASE_DIR="./dist/release/"

mkdir -p $RELEASE_DIR

# if this is run on travis make sure that binary was build with corrent version
if [[ -n $TRAVIS_TAG ]]; then
echo "Checking if ocdev version was set to the same version as current tag"
# use sed to get only semver part
bin_version=$(${BIN_DIR}/darwin-amd64/ocdev version | sed 's/ .*//g')
if [ "$TRAVIS_TAG" == "v${bin_version}" ]; then
echo "OK: ocdev version output is matching current tag"
else
echo "ERR: TRAVIS_TAG ($TRAVIS_TAG) is not matching 'ocdev version' (v${bin_version})"
exit 1
fi
fi

for arch in `ls -1 $BIN_DIR/`;do
suffix=""
if [[ $arch == windows-* ]]; then
Expand Down

0 comments on commit 8d56bb3

Please sign in to comment.