kou commented on code in PR #979:
URL: https://github.com/apache/arrow-adbc/pull/979#discussion_r1295093526


##########
ci/scripts/website_build.sh:
##########
@@ -60,21 +60,20 @@ main() {
     # Copy the version script and regenerate the version list
     # The versions get embedded into the JavaScript file to save a roundtrip
     rm -f "${site}/version.js"
-    cp "${repo}/docs/source/_static/version.js" "${site}/version.js"
-    echo >> "${site}/version.js"
     echo 'const versions = `' >> "${site}/version.js"
 
     pushd "${site}"
+    rm -f "${site}/versions.txt"
     for inv in */objects.inv; do
+        if [[ "$(dirname $inv)" = "current" ]]; then
+            continue
+        fi
         echo "$(dirname $inv);$(sphobjinv convert json $inv - | jq -r 
.version)"
     done | sort -t ";" --version-sort | tee --append "${site}/version.js" 
"${site}/versions.txt"
     popd
 
-    echo '`;' >> "${site}/version.js"
-    git -C "${site}" add -f "version.js"
-
     # Determine the latest stable version
-    local -r latest_docs=$(grep -E ';[0-9]+\.[0-9]+\.[0-9]+$' 
"${site}/versions.txt" | sort -t ';' --version-sort | tail -n1)
+    local -r latest_docs=$(grep -E ';[0-9]+\.[0-9]+\.[0-9]+$' 
"${site}/versions.txt" | grep -v -E '^current;' | sort -t ';' --version-sort | 
tail -n1)

Review Comment:
   It seems that this is needless because the above `for inv ...` loop skips 
`current`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to