|
84 | 84 | echo # Newline for better readability |
85 | 85 |
|
86 | 86 | if [[ -n "$DETECTED_VERSION" ]]; then |
87 | | - # v5.1+ uses flat structure (no version prefix in path) |
88 | | - # v5.0 and earlier use nested structure (version prefix in path) |
89 | | - # Use version comparison: if DETECTED_VERSION >= 5.1, use flat structure |
90 | | - if [[ "$(printf '%s\n' "5.1" "$DETECTED_VERSION" | sort -V | head -n1)" == "5.1" ]]; then |
91 | | - # For v5.1+: ivorysql-doc:v5.1:welcome.adoc (no version prefix in path) |
92 | | - NEW_START_PAGE="${START_PAGE_COMPONENT_NAME}:v${DETECTED_VERSION}:${START_PAGE_FILE_PATH}" |
93 | | - else |
94 | | - # For v5.0 and earlier: ivorysql-doc:v5.0:v5.0/welcome.adoc (with version prefix) |
95 | | - NEW_START_PAGE="${START_PAGE_COMPONENT_NAME}:v${DETECTED_VERSION}:v${DETECTED_VERSION}/${START_PAGE_FILE_PATH}" |
96 | | - fi |
| 87 | + # All branches use flat structure (single-level path): ivorysql-doc:v5.1:welcome.adoc |
| 88 | + NEW_START_PAGE="${START_PAGE_COMPONENT_NAME}:v${DETECTED_VERSION}:${START_PAGE_FILE_PATH}" |
97 | 89 | yq -i ".site.start_page = \"$NEW_START_PAGE\"" "$PLAYBOOK_FILE" |
98 | 90 | echo "Updated .site.start_page in $PLAYBOOK_FILE to: $NEW_START_PAGE" |
99 | 91 | else |
@@ -143,16 +135,8 @@ jobs: |
143 | 135 |
|
144 | 136 | TARGET_BRANCH="v${LATEST_VERSION}" |
145 | 137 | |
146 | | - # v5.1+ uses flat structure (single-level path) |
147 | | - # v5.0 and earlier use nested structure (double-level path) |
148 | | - # Use version comparison: if LATEST_VERSION >= 5.1, use flat structure |
149 | | - if [[ "$(printf '%s\n' "5.1" "$LATEST_VERSION" | sort -V | head -n1)" == "5.1" ]]; then |
150 | | - # For v5.1+: ivorysql-doc/v5.1/welcome.html (single-level) |
151 | | - EXPECTED_PATH="ivorysql-doc/v${LATEST_VERSION}/welcome.html" |
152 | | - else |
153 | | - # For v5.0 and earlier: ivorysql-doc/v5.0/v5.0/welcome.html (double-level) |
154 | | - EXPECTED_PATH="ivorysql-doc/v${LATEST_VERSION}/v${LATEST_VERSION}/welcome.html" |
155 | | - fi |
| 138 | + # All versions use flat structure (single-level path): ivorysql-doc/v5.1/welcome.html |
| 139 | + EXPECTED_PATH="ivorysql-doc/v${LATEST_VERSION}/welcome.html" |
156 | 140 |
|
157 | 141 | if [[ "${MERGED_PR_BASE}" != "${TARGET_BRANCH}" ]]; then |
158 | 142 | echo "Base branch ${MERGED_PR_BASE} is not the latest version branch ${TARGET_BRANCH}, skip index redirect check." |
|
0 commit comments