Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
ci: travis: Fix check when VERSION has not changed
Browse files Browse the repository at this point in the history
When VERSION file is not updated, the script should not fail.

Fixes #1581

Signed-off-by: Jose Carlos Venegas Munoz <[email protected]>
  • Loading branch information
jcvenegas committed Oct 9, 2019
1 parent 6b55a53 commit d2c019a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .ci/versions_checker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
# This ensures that the rest
# of the components are merged before the runtime

set -e
set -o errexit
set -o nounset
set -o pipefail
set -o errtrace

GOPATH=${GOPATH:-${HOME}/go}

Expand All @@ -22,7 +25,10 @@ KATA_BRANCH=${target_branch:-master}

go get -d "${PACKAGING_REPO}" || true

check_changes=$(git diff --name-only "origin/${KATA_BRANCH}" | grep VERSION)
if ! check_changes=$(git diff --name-only "origin/${KATA_BRANCH}" | grep VERSION); then
echo "No changes in VERSION file - this is not a bump - nothing to check"
exit 0
fi
version_to_check=$(cat "${GOPATH}/src/${RUNTIME_REPO}/VERSION")

if [ ! -z "$check_changes" ]; then
Expand Down

0 comments on commit d2c019a

Please sign in to comment.