mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-25 15:02:45 +00:00
tools: Use vars for the registry in the update repo script
Similarly to what was done for the yaml files, let's use a var for representing the registry where our images will be pushed to and avoid repetition and too long lines. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
ac958a3073
commit
c8e22daf67
@ -157,6 +157,8 @@ bump_repo() {
|
|||||||
# kata-deploy-stable | NON-EXISTENT | NON-EXISTENT |
|
# kata-deploy-stable | NON-EXISTENT | NON-EXISTENT |
|
||||||
# -------------------+----------------+----------------+
|
# -------------------+----------------+----------------+
|
||||||
|
|
||||||
|
local registry="quay.io/kata-containers/kata-deploy"
|
||||||
|
|
||||||
info "Updating kata-deploy / kata-cleanup image tags"
|
info "Updating kata-deploy / kata-cleanup image tags"
|
||||||
local version_to_replace="${current_version}"
|
local version_to_replace="${current_version}"
|
||||||
local replacement="${new_version}"
|
local replacement="${new_version}"
|
||||||
@ -175,8 +177,8 @@ bump_repo() {
|
|||||||
|
|
||||||
if [ "${version_to_replace}" != "${replacement}" ]; then
|
if [ "${version_to_replace}" != "${replacement}" ]; then
|
||||||
## this covers case 2) and 3), as on both of them we have changes on kata-deploy / kata-cleanup files
|
## this covers case 2) and 3), as on both of them we have changes on kata-deploy / kata-cleanup files
|
||||||
sed -i "s#quay.io/kata-containers/kata-deploy:${version_to_replace}#quay.io/kata-containers/kata-deploy:${new_version}#g" "${kata_deploy_yaml}"
|
sed -i "s#${registry}:${version_to_replace}#${registry}:${new_version}#g" "${kata_deploy_yaml}"
|
||||||
sed -i "s#quay.io/kata-containers/kata-deploy:${version_to_replace}#quay.io/kata-containers/kata-deploy:${new_version}#g" "${kata_cleanup_yaml}"
|
sed -i "s#${registry}:${version_to_replace}#${registry}:${new_version}#g" "${kata_cleanup_yaml}"
|
||||||
|
|
||||||
git diff
|
git diff
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user