Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dev/release/utils-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ update_versions() {
local java_version="${VERSION_JAVA}"
local py_version="${VERSION_NATIVE}"
local r_version="${VERSION_R}"
local latest_release_version="${RELEASE}"
;;
snapshot)
local c_version="${VERSION_NATIVE}-SNAPSHOT"
Expand All @@ -43,6 +44,7 @@ update_versions() {
local java_version="${VERSION_JAVA}-SNAPSHOT"
local py_version="${VERSION_NATIVE}dev"
local r_version="${PREVIOUS_VERSION_R}.9000"
local latest_release_version="${PREVIOUS_RELEASE}"
;;
*)
echo "Unknown type: ${type}"
Expand Down Expand Up @@ -98,6 +100,8 @@ update_versions() {

sed -i.bak -E "s/release = \".+\"/release = \"${docs_version}\"/g" "${ADBC_DIR}/docs/source/conf.py"
rm "${ADBC_DIR}/docs/source/conf.py.bak"
sed -i.bak -E "s/latest_release = \".+\"/latest_release = \"${latest_release_version}\"/g" "${ADBC_DIR}/docs/source/conf.py"
rm "${ADBC_DIR}/docs/source/conf.py.bak"
git add "${ADBC_DIR}/docs/source/conf.py"

pushd "${ADBC_DIR}/java/"
Expand Down
12 changes: 12 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import os
import sys
from pathlib import Path
from urllib.parse import quote

sys.path.append(str(Path("./ext/sphinx_recipe").resolve()))
sys.path.append(str(Path("./ext").resolve()))
Expand All @@ -34,6 +35,8 @@
release = "23 (dev)"
# Needed to generate version switcher
version = release
# For linking to latest downloads
latest_release = "22"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down Expand Up @@ -76,6 +79,15 @@ def setup(app):
app.connect("missing-reference", on_missing_reference)


# -- Global substitutions -----------------------------------------------------
# Note: uses quote because Sphinx will break if `release` has any spaces in it
rst_prolog = (
f".. |source_download| replace:: `apache-arrow-adbc-{quote(latest_release)}.tar.gz <https://www.apache.org/dyn/closer.lua/arrow/apache-arrow-adbc-{quote(latest_release)}/apache-arrow-adbc-{quote(latest_release)}.tar.gz>`__\n" # noqa: E501
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I could remove the quote calls but I also guess they make this safer.

f".. |source_checksum| replace:: `checksum <https://downloads.apache.org/arrow/apache-arrow-adbc-{quote(latest_release)}/apache-arrow-adbc-{quote(latest_release)}.tar.gz.sha512>`__\n" # noqa: E501
f".. |source_signature| replace:: `signature <https://downloads.apache.org/arrow/apache-arrow-adbc-{quote(latest_release)}/apache-arrow-adbc-{quote(latest_release)}.tar.gz.asc>`__\n" # noqa: E501
)


# -- Options for autodoc ----------------------------------------------------

try:
Expand Down
8 changes: 6 additions & 2 deletions docs/source/driver/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@ Installation
Source
======

The latest source release can be downloaded from the `Apache mirrors`_.
Download the latest source release: |source_download| (|source_checksum|, |source_signature|)

To verify a release, please see the `instructions`_ page and the project's `KEYS`_ file.

Compilation instructions can be found in `CONTRIBUTING.md`_.

.. _Apache mirrors: https://www.apache.org/dyn/closer.lua/arrow/
.. _CONTRIBUTING.md: https://github.com/apache/arrow-adbc/blob/main/CONTRIBUTING.md
.. _instructions: https://www.apache.org/info/verification.html
.. _KEYS: https://downloads.apache.org/arrow/KEYS

C/C++
=====
Expand Down
Loading