mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-28 00:07:16 +00:00
ci: Fix versions_checker.sh
Version checker does to work today - Allow to detect stabe branches Fixes #1581 Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
parent
a4b5a565ff
commit
5b226d0d39
@ -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
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user