mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-01 21:24:36 +00:00
tools: Do the kata-deploy changes on its own commit
Rather than doing the kata-deploy changes as part of the release bump commit, let's split those on its own changes, as it will both make the life of the reviewer less confusing and also allows us to start preparing the field for a possible automated revert of these changes, whenever it becomes needed. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
c8e22daf67
commit
36d73c96c8
@ -62,6 +62,26 @@ get_changes() {
|
||||
git log --oneline "${current_version}..HEAD" --no-merges
|
||||
}
|
||||
|
||||
generate_kata_deploy_commit() {
|
||||
local new_version=$1
|
||||
[ -n "$new_version" ] || die "no new version"
|
||||
|
||||
printf "release: Adapt kata-deploy for %s" "${new_version}"
|
||||
|
||||
printf "\n
|
||||
kata-deploy files must be adapted to a new release. The cases where it
|
||||
happens are when the release goes from -> to:
|
||||
* main -> stable:
|
||||
* kata-deploy / kata-cleanup: change from \"latest\" to \"rc0\"
|
||||
* kata-deploy-stable / kata-cleanup-stable: are removed
|
||||
|
||||
* stable -> stable:
|
||||
* kata-deploy / kata-cleanup: bump the release to the new one.
|
||||
|
||||
There are no changes when doing an alpha release, as the files on the
|
||||
\"main\" branch always point to the \"latest\" and \"stable\" tags."
|
||||
}
|
||||
|
||||
generate_commit() {
|
||||
local new_version=$1
|
||||
local current_version=$2
|
||||
@ -184,6 +204,10 @@ bump_repo() {
|
||||
|
||||
git add "${kata_deploy_yaml}"
|
||||
git add "${kata_cleanup_yaml}"
|
||||
|
||||
info "Creating the commit with the kata-deploy changes"
|
||||
local commit_msg="$(generate_kata_deploy_commit $new_version)"
|
||||
git commit -s -m "${commit_msg}"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user