kou commented on code in PR #14839:
URL: https://github.com/apache/arrow/pull/14839#discussion_r1040092560
##########
dev/release/post-08-docs.sh:
##########
@@ -83,6 +83,8 @@ git checkout docs/c_glib/index.html
if [ "$is_major_release" = "yes" ] ; then
mv docs_temp docs/${previous_version}
fi
+# Correct the stable version in versionwarnings.js
+sed -i -e "s/${previous_version}/${version}/g" docs/versionwarning.js
Review Comment:
BTW, we have https://arrow.apache.org/docs/_static/versions.json . Can we
use it instead of embedding the latest stable version into
https://github.com/AlenkaF/arrow-site/blob/73fb93f1f2254efd11b83e8de8b020d085d009e7/docs/versionwarning.js#L4
?
##########
dev/release/post-08-docs.sh:
##########
@@ -83,6 +83,8 @@ git checkout docs/c_glib/index.html
if [ "$is_major_release" = "yes" ] ; then
mv docs_temp docs/${previous_version}
fi
+# Correct the stable version in versionwarnings.js
+sed -i -e "s/${previous_version}/${version}/g" docs/versionwarning.js
Review Comment:
`sed -i` isn't portable. It works with GNU sed but not BSD sed that is
shipped on macOS.
Could you use `sed -i.bak ...` and `rm versionwarning.js.bak` like
`dev/release/utils-prepare.sh` instead?
##########
docs/source/_templates/layout.html:
##########
@@ -26,3 +26,9 @@
{# Silence the navbar #}
{% block docs_navbar %}
{% endblock %}
+
+{# Add version warnings #}
+{% block footer %}
+ {{ super() }}
+ <script type="text/javascript" src="/docs/versionwarning.js"></script>
Review Comment:
I like `docs/source/_static/` because
https://github.com/apache/arrow/blob/master/docs/source/_static/versions.json
uses `docs/source/_static/`.
--
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]