diff --git a/tools/release/do_release.sh b/tools/release/do_release.sh index 11603160..2bfed4ef 100755 --- a/tools/release/do_release.sh +++ b/tools/release/do_release.sh @@ -27,12 +27,11 @@ function updateVitessImages() { old_vitess_version=$1 new_vitess_version=$2 - operator_files=$(find -E $ROOT/test/endtoend/operator/* -name "*.yaml" | grep -v "101_initial_cluster.yaml" | grep -v "101_initial_cluster_backup.yaml") - sed -i.bak -E "s/vitess\/lite:(.*)/vitess\/lite:v$new_vitess_version/g" $operator_files - sed -i.bak -E "s/vitess\/vtadmin:(.*)/vitess\/vtadmin:v$new_vitess_version/g" $operator_files - sed -i.bak -E "s/vitess\/lite:(.*)/vitess\/lite:v$new_vitess_version\"/g" $ROOT/pkg/apis/planetscale/v2/defaults.go - sed -i.bak -E "s/vitess\/lite:(.*)/vitess\/lite:v$old_vitess_version/g" $ROOT/test/endtoend/operator/101_initial_cluster.yaml - sed -i.bak -E "s/vitess\/lite:(.*)/vitess\/lite:v$new_vitess_version-mysql57/g" $ROOT/test/endtoend/operator/101_initial_cluster_backup.yaml + operator_files=$(find -E $ROOT/test/endtoend/operator/* -name "*.yaml" | grep -v "101_initial_cluster.yaml") + sed -i.bak -E "s/vitess\/lite:([^-]*)(-rc[0-9]*)?(-mysql.*)?/vitess\/lite:v$new_vitess_version\3/g" $operator_files + sed -i.bak -E "s/vitess\/vtadmin:([^-]*)(-rc[0-9]*)?(-mysql.*)?/vitess\/vtadmin:v$new_vitess_version\3/g" $operator_files + sed -i.bak -E "s/vitess\/lite:([^-]*)(-rc[0-9]*)?(-mysql.*)?/vitess\/lite:v$new_vitess_version\3\"/g" $ROOT/pkg/apis/planetscale/v2/defaults.go + sed -i.bak -E "s/vitess\/lite:([^-]*)(-rc[0-9]*)?(-mysql.*)?/vitess\/lite:v$old_vitess_version\3/g" $ROOT/test/endtoend/operator/101_initial_cluster.yaml rm -f $(find -E $ROOT/test/endtoend/operator/ -name "*.yaml.bak") $ROOT/pkg/apis/planetscale/v2/defaults.go.bak }