Skip to content

Commit

Permalink
GH-40458: [Release][Docs] Changes for version and warning banner shou…
Browse files Browse the repository at this point in the history
…ld not affect minor releases (#40459)

This PR adds an if case to me make sure the change in version and warning banner only affects major releases.
* GitHub Issue: #40458

Authored-by: AlenkaF <[email protected]>
Signed-off-by: AlenkaF <[email protected]>
  • Loading branch information
AlenkaF authored Mar 12, 2024
1 parent 605f8a7 commit b202ede
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions dev/release/post-08-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,22 @@ git commit -m "[Website] Update documentations for ${version}"

# Update DOCUMENTATION_OPTIONS.theme_switcher_version_match and
# DOCUMENTATION_OPTIONS.show_version_warning_banner
pushd docs/${previous_series}
find ./ \
-type f \
-exec \
sed -i.bak \
-e "s/DOCUMENTATION_OPTIONS.theme_switcher_version_match = '';/DOCUMENTATION_OPTIONS.theme_switcher_version_match = '${previous_version}';/g" \
-e "s/DOCUMENTATION_OPTIONS.show_version_warning_banner = false/DOCUMENTATION_OPTIONS.show_version_warning_banner = true/g" \
{} \;
find ./ -name '*.bak' -delete
popd
git add docs/${previous_series}
git commit -m "[Website] Update warning banner for ${previous_series}"
git clean -d -f -x
popd
if [ "$is_major_release" = "yes" ] ; then
pushd docs/${previous_series}
find ./ \
-type f \
-exec \
sed -i.bak \
-e "s/DOCUMENTATION_OPTIONS.theme_switcher_version_match = '';/DOCUMENTATION_OPTIONS.theme_switcher_version_match = '${previous_series}';/g" \
-e "s/DOCUMENTATION_OPTIONS.show_version_warning_banner = false/DOCUMENTATION_OPTIONS.show_version_warning_banner = true/g" \
{} \;
find ./ -name '*.bak' -delete
popd
git add docs/${previous_series}
git commit -m "[Website] Update warning banner for ${previous_series}"
git clean -d -f -x
popd
fi

: ${PUSH:=1}

Expand Down

0 comments on commit b202ede

Please sign in to comment.