@@ -21,7 +21,7 @@ tag_products() {
2121 update_product_images_changelogs
2222
2323 git commit -am " release $RELEASE_TAG "
24- git tag " $RELEASE_TAG "
24+ git tag " $RELEASE_TAG " -m " release $RELEASE_TAG "
2525 push_branch
2626}
2727
@@ -36,8 +36,7 @@ tag_operators() {
3636 git submodule update --recursive --init
3737 fi
3838
39- CARGO_VERSION=" $INITIAL_DIR " /release/cargo-version.py
40- $CARGO_VERSION --set " $RELEASE_TAG "
39+ cargo set-version --offline --workspace " $RELEASE_TAG "
4140 cargo update --workspace
4241 make regenerate-charts
4342
@@ -52,7 +51,7 @@ tag_operators() {
5251 update_changelog " $TEMP_RELEASE_FOLDER /${operator} "
5352
5453 git commit -am " release $RELEASE_TAG "
55- git tag " $RELEASE_TAG "
54+ git tag " $RELEASE_TAG " -m " release $RELEASE_TAG "
5655 push_branch
5756 done < <( yq ' ... comments="" | .operators[] ' " $INITIAL_DIR " /release/config.yaml)
5857}
@@ -125,34 +124,39 @@ checks() {
125124}
126125
127126update_code () {
128- echo " Updating antora docs for $1 "
129- # antora version should be major.minor, not patch level
130- yq -i " .version = \" ${RELEASE} \" " " $1 /docs/antora.yml"
131- yq -i ' .prerelease = false' " $1 /docs/antora.yml"
132-
133- # Not all operators have a getting started guide
134- # that's why we verify if templating_vars.yaml exists.
135- if [ -f " $1 /docs/templating_vars.yaml" ]; then
136- yq -i " (.versions.[] | select(. == \" *dev\" )) |= \" ${RELEASE_TAG} \" " " $1 /docs/templating_vars.yaml"
137- yq -i " .helm.repo_name |= sub(\" stackable-dev\" , \" stackable-stable\" )" " $1 /docs/templating_vars.yaml"
138- yq -i " .helm.repo_url |= sub(\" helm-dev\" , \" helm-stable\" )" " $1 /docs/templating_vars.yaml"
127+ if [ -d " $1 /docs" ]; then
128+ echo " Updating antora docs for $1 "
129+ # antora version should be major.minor, not patch level
130+ yq -i " .version = \" ${RELEASE} \" " " $1 /docs/antora.yml"
131+ yq -i ' .prerelease = false' " $1 /docs/antora.yml"
132+
133+ # Not all operators have a getting started guide
134+ # that's why we verify if templating_vars.yaml exists.
135+ if [ -f " $1 /docs/templating_vars.yaml" ]; then
136+ yq -i " (.versions.[] | select(. == \" *dev\" )) |= \" ${RELEASE_TAG} \" " " $1 /docs/templating_vars.yaml"
137+ yq -i " .helm.repo_name |= sub(\" stackable-dev\" , \" stackable-stable\" )" " $1 /docs/templating_vars.yaml"
138+ yq -i " .helm.repo_url |= sub(\" helm-dev\" , \" helm-stable\" )" " $1 /docs/templating_vars.yaml"
139+ fi
140+
141+ # --------------------------------------------------------------------------
142+ # Replace "nightly" link so the documentation refers to the current version
143+ # --------------------------------------------------------------------------
144+ for file in $( find " $1 /docs" -name " *.adoc" ) ; do
145+ sed -i " s/nightly@home/home/g" " $file "
146+ done
147+ else
148+ echo " No docs found under $1 ."
139149 fi
140150
141151 # --------------------------------------------------------------------------
142152 # Replace .spec.image.stackableVersion for kuttl tests.
143153 # Use sed as yq does not process .j2 file syntax properly.
154+ # N.B. commented out as the tests assume same stackable version as operator
144155 # --------------------------------------------------------------------------
145- if [ -f " $1 /tests/test-definition.yaml" ]; then
146- # e.g. 2.2.4-stackable0.5.0 -> 2.2.4-stackable23.1
147- sed -i " s/-stackable.*/-stackable${RELEASE} /" " $1 /tests/test-definition.yaml"
148- fi
149-
150- # --------------------------------------------------------------------------
151- # Replace "nightly" link so the documentation refers to the current version
152- # --------------------------------------------------------------------------
153- for file in $( find " $1 /docs" -name " *.adoc" ) ; do
154- sed -i " s/nightly@home/home/g" " $file "
155- done
156+ # if [ -f "$1/tests/test-definition.yaml" ]; then
157+ # # e.g. 2.2.4-stackable0.5.0 -> 2.2.4-stackable23.1
158+ # sed -i "s/-stackable.*/-stackable${RELEASE}/" "$1/tests/test-definition.yaml"
159+ # fi
156160}
157161
158162push_branch () {
@@ -180,7 +184,7 @@ update_changelog() {
180184
181185update_product_images_changelogs () {
182186 TODAY=$( date +' %Y-%m-%d' )
183- sed -i " s/^.*unreleased.*/## [Unreleased]\n\n## [$RELEASE_TAG ] - $TODAY /I" ./** / CHANGELOG.md
187+ sed -i " s/^.*unreleased.*/## [Unreleased]\n\n## [$RELEASE_TAG ] - $TODAY /I" ./CHANGELOG.md
184188}
185189
186190parse_inputs () {
0 commit comments