Skip to content

Commit

Permalink
feat: add automation to change vitess version in the docker-release s…
Browse files Browse the repository at this point in the history
…cript (vitessio#11815)

Signed-off-by: Manan Gupta <[email protected]>

Signed-off-by: Manan Gupta <[email protected]>
Co-authored-by: Manan Gupta <[email protected]>
  • Loading branch information
vitess-bot[bot] and GuptaManan100 authored Nov 28, 2022
1 parent 8bc1fbc commit 9d2f752
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/do_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ function updateVitessExamples () {
rm -f $(find -E $ROOT/examples/compose/**/* -regex ".*.(go|yml).bak")
}

# First argument is the Release Version the docker release script should be set to (for instance: v15.0.0)
function updateDockerReleaseScript () {
sed -i.bak -E "s/vt_base_version=.*/vt_base_version='$1'/g" $ROOT/docker/release.sh
rm -f $ROOT/docker/release.sh.bak
}

# Preparing and tagging the release
function doRelease () {
checkoutNewBranch "tag"
Expand All @@ -131,6 +137,7 @@ function doRelease () {
# Preparing the release commit
updateVitessExamples $RELEASE_VERSION $VTOP_VERSION
updateJava $RELEASE_VERSION
updateDockerReleaseScript $RELEASE_VERSION
updateVersionGo $RELEASE_VERSION

## Create the commit for this release and tag it
Expand All @@ -152,6 +159,7 @@ function doBackToDevMode () {

# Preparing the "dev mode" commit
updateJava $DEV_VERSION
updateDockerReleaseScript $DEV_VERSION
updateVersionGo $DEV_VERSION

git add --all
Expand Down

0 comments on commit 9d2f752

Please sign in to comment.