Merge pull request #2141 from jcvenegas/merge-check-for-release

ci: Fix versions_checker.sh
This commit is contained in:
Jose Carlos Venegas Munoz 2019-10-21 13:19:06 -05:00 committed by GitHub
commit 559327c021
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 3 deletions

View File

@ -12,20 +12,29 @@
# 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}
PACKAGING_REPO="github.com/kata-containers/packaging"
RUNTIME_REPO="github.com/kata-containers/runtime"
KATA_BRANCH=${target_branch:-master}
go get -d "${PACKAGING_REPO}" || true
check_changes=$(git diff "${GOPATH}/src/${RUNTIME_REPO}/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
echo "Changes detected on VERSION"
echo "Check versions in branch ${KATA_BRANCH}"
pushd "${GOPATH}/src/${PACKAGING_REPO}"
./release/tag_repos.sh pre-release "${version_to_check}"
./release/tag_repos.sh -b "${KATA_BRANCH}" pre-release "${version_to_check}"
popd
fi

View File

@ -24,7 +24,10 @@ env:
- target_branch=$TRAVIS_BRANCH
before_install:
- git remote set-branches --add origin "${TRAVIS_BRANCH}"
- git fetch
- ".ci/setup.sh"
- ".ci/versions_checker.sh"
before_script:
- ".ci/install_go.sh"