mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-04 14:37:25 +00:00
tools: Remove the check for the VERSION file
All repos we release (https://github.com/kata-containers/kata-containers and https://github.com/kata-containers/tests) have a VERSION file. Keeping a check for it, although useful for a new repo, just complicates the use-case we currently deal with. While here, let's also anchor the '#' and potentially exclude blank lines, following James' suggestion. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
85eb743f46
commit
5dbd752f8f
@ -36,10 +36,6 @@ trap 'handle_error $LINENO' ERR
|
|||||||
get_changes() {
|
get_changes() {
|
||||||
local current_version=$1
|
local current_version=$1
|
||||||
[ -n "${current_version}" ] || die "current version not provided"
|
[ -n "${current_version}" ] || die "current version not provided"
|
||||||
if [ "${current_version}" == "new" ];then
|
|
||||||
echo "Starting to version this repository"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If for some reason there is not a tag this could fail
|
# If for some reason there is not a tag this could fail
|
||||||
# better fail and write the error in the PR
|
# better fail and write the error in the PR
|
||||||
@ -134,21 +130,14 @@ bump_repo() {
|
|||||||
git fetch origin "${target_branch}"
|
git fetch origin "${target_branch}"
|
||||||
git checkout "origin/${target_branch}" -b "${branch}"
|
git checkout "origin/${target_branch}" -b "${branch}"
|
||||||
|
|
||||||
# All repos we build should have a VERSION file
|
local current_version="$(egrep -v '^(#|$)' ./VERSION)"
|
||||||
if [ ! -f "VERSION" ]; then
|
|
||||||
current_version="new"
|
|
||||||
echo "${new_version}" >VERSION
|
|
||||||
else
|
|
||||||
current_version="$(grep -v '#' ./VERSION)"
|
|
||||||
|
|
||||||
info "Updating VERSION file"
|
info "Updating VERSION file"
|
||||||
echo "${new_version}" >VERSION
|
echo "${new_version}" >VERSION
|
||||||
if git diff --exit-code; then
|
if git diff --exit-code; then
|
||||||
info "${repo} already in version ${new_version}"
|
info "${repo} already in version ${new_version}"
|
||||||
cat VERSION
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${repo}" == "kata-containers" ]; then
|
if [ "${repo}" == "kata-containers" ]; then
|
||||||
# Here there are 3 scenarios of what we can do, based on
|
# Here there are 3 scenarios of what we can do, based on
|
||||||
|
Loading…
Reference in New Issue
Block a user