Skip to content

Commit 9fd43d2

Browse files
committed
Update download links in docs for GitHub releases
1 parent bc3b3e1 commit 9fd43d2

File tree

6 files changed

+88
-66
lines changed

6 files changed

+88
-66
lines changed

docs/src/main/sphinx/client/cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Versions before 350 are not supported.
2525
(cli-installation)=
2626
## Installation
2727

28-
Download {maven_download}`cli`, rename it to `trino`, make it executable with
28+
Download {github_release_download}`cli`, rename it to `trino`, make it executable with
2929
`chmod +x`, and run it to show the version of the CLI:
3030

3131
```text

docs/src/main/sphinx/client/jdbc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Versions before 350 are not supported.
2727
(jdbc-installation)=
2828
## Installation
2929

30-
Download {maven_download}`jdbc` and add it to the classpath of your Java application.
30+
Download {github_release_download}`jdbc` and add it to the classpath of your Java application.
3131

3232
The driver is also available from Maven Central:
3333

docs/src/main/sphinx/develop/example-http.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ image](/installation/containers).
1414
Follow the [plugin installation instructions](plugins-installation) and
1515
optionally use the [trino-packages
1616
project](https://github.com/trinodb/trino-packages) or manually download the
17-
plugin archive {maven_download}`example-http`.
17+
plugin archive {github_release_download}`example-http`.
1818

1919
## Code
2020

docs/src/main/sphinx/ext/download.py

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ def maven_filename(artifact, version, packaging, classifier):
8585
classifier = '-' + classifier if classifier else ''
8686
return '%s-%s%s.%s' % (artifact, version, classifier, packaging)
8787

88+
def github_release_download(group, artifact, version, packaging, classifier):
89+
base = 'https://github.com/trinodb/trino/releases/download/'
90+
filename = maven_filename(artifact, version, packaging, classifier)
91+
return base + '/' + version + '/' + filename
8892

8993
def maven_download(group, artifact, version, packaging, classifier):
9094
base = 'https://repo1.maven.org/maven2/'
@@ -95,7 +99,7 @@ def maven_download(group, artifact, version, packaging, classifier):
9599

96100
def setup(app):
97101
# noinspection PyDefaultArgument,PyUnusedLocal
98-
def download_link_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
102+
def maven_link_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
99103
version = app.config.release
100104

101105
if not text in ARTIFACTS:
@@ -110,7 +114,25 @@ def download_link_role(role, rawtext, text, lineno, inliner, options={}, content
110114
node = nodes.reference(title, title, internal=False, refuri=uri)
111115

112116
return [node], []
113-
app.add_role('maven_download', download_link_role)
117+
118+
def github_link_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
119+
version = app.config.release
120+
121+
if not text in ARTIFACTS:
122+
inliner.reporter.error('Unsupported download type: ' + text, line=lineno)
123+
return [], []
124+
125+
artifact, packaging, classifier = ARTIFACTS[text]
126+
127+
title = maven_filename(artifact, version, packaging, classifier)
128+
uri = github_release_download(GROUP_ID, artifact, version, packaging, classifier)
129+
130+
node = nodes.reference(title, title, internal=False, refuri=uri)
131+
132+
return [node], []
133+
134+
app.add_role('maven_download', maven_link_role)
135+
app.add_role('github_release_download', github_link_role)
114136

115137
return {
116138
'parallel_read_safe': True,

docs/src/main/sphinx/installation/deployment.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ Docker image](https://hub.docker.com/r/trinodb/trino).
4242

4343
## Installing Trino
4444

45-
Download the Trino server tarball, {maven_download}`server`, and unpack it. The
46-
tarball contains a single top-level directory, `trino-server-|trino_version|`,
47-
which we call the *installation* directory.
45+
Download the Trino server tarball, {github_release_download}`server`, and unpack
46+
it. The tarball contains a single top-level directory,
47+
`trino-server-|trino_version|`, which we call the *installation* directory.
4848

4949
The default tarball contains all plugins and must be configured for use. The
50-
minimal `server-core` tarball, {maven_download}`server-core`, contains a minimal
51-
set of essential plugins, and it is therefore mostly suitable as a base for
52-
custom tarball creation.
50+
minimal `server-core` tarball, {github_release_download}`server-core`, contains
51+
a minimal set of essential plugins, and it is therefore mostly suitable as a
52+
base for custom tarball creation.
5353

5454
The [trino-packages project](https://github.com/trinodb/trino-packages) includes
5555
a module to create a fully configured tarball with an example configuration. The

docs/src/main/sphinx/installation/plugins.md

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -147,221 +147,221 @@ with the listed coordinates.
147147
* - ai-functions
148148
- [](/functions/ai)
149149
- [io.trino:trino-ai-functions](https://central.sonatype.com/search?q=io.trino%3Atrino-ai-functions)
150-
- {maven_download}`ai-functions`
150+
- {github_release_download}`ai-functions`
151151
* - bigquery
152152
- [](/connector/bigquery)
153153
- [io.trino:trino-bigquery](https://central.sonatype.com/search?q=io.trino%3Atrino-bigquery)
154-
- {maven_download}`bigquery`
154+
- {github_release_download}`bigquery`
155155
* - blackhole
156156
- [](/connector/blackhole)
157157
- [io.trino:trino-blackhole](https://central.sonatype.com/search?q=io.trino%3Atrino-blackhole)
158-
- {maven_download}`blackhole`
158+
- {github_release_download}`blackhole`
159159
* - cassandra
160160
- [](/connector/cassandra)
161161
- [io.trino:trino-cassandra](https://central.sonatype.com/search?q=io.trino%3Atrino-cassandra)
162-
- {maven_download}`cassandra`
162+
- {github_release_download}`cassandra`
163163
* - clickhouse
164164
- [](/connector/clickhouse)
165165
- [io.trino:trino-clickhouse](https://central.sonatype.com/search?q=io.trino%3Atrino-clickhouse)
166-
- {maven_download}`clickhouse`
166+
- {github_release_download}`clickhouse`
167167
* - delta-lake
168168
- [](/connector/delta-lake)
169169
- [io.trino:trino-delta-lake](https://central.sonatype.com/search?q=io.trino%3Atrino-delta-lake)
170-
- {maven_download}`delta-lake`
170+
- {github_release_download}`delta-lake`
171171
* - druid
172172
- [](/connector/druid)
173173
- [io.trino:trino-druid](https://central.sonatype.com/search?q=io.trino%3Atrino-druid)
174-
- {maven_download}`druid`
174+
- {github_release_download}`druid`
175175
* - duckdb
176176
- [](/connector/duckdb)
177177
- [io.trino:trino-duckdb](https://central.sonatype.com/search?q=io.trino%3Atrino-duckdb)
178-
- {maven_download}`duckdb`
178+
- {github_release_download}`duckdb`
179179
* - elasticsearch
180180
- [](/connector/elasticsearch)
181181
- [io.trino:trino-elasticsearch](https://central.sonatype.com/search?q=io.trino%3Atrino-elasticsearch)
182-
- {maven_download}`elasticsearch`
182+
- {github_release_download}`elasticsearch`
183183
* - example-http
184184
- [](/develop/example-http)
185185
- [io.trino:trino-example-http](https://central.sonatype.com/search?q=io.trino%3Atrino-example-http)
186-
- {maven_download}`example-http`
186+
- {github_release_download}`example-http`
187187
* - exasol
188188
- [](/connector/exasol)
189189
- [io.trino:trino-exasol](https://central.sonatype.com/search?q=io.trino%3Atrino-exasol)
190-
- {maven_download}`exasol`
190+
- {github_release_download}`exasol`
191191
* - exchange-filesystem
192192
- [](/admin/fault-tolerant-execution) exchange file system
193193
- [io.trino:trino-exchange-filesystem](https://central.sonatype.com/search?q=io.trino%3Atrino-exchange-filesystem)
194-
- {maven_download}`exchange-filesystem`
194+
- {github_release_download}`exchange-filesystem`
195195
* - exchange-hdfs
196196
- [](/admin/fault-tolerant-execution) exchange file system for HDFS
197197
- [io.trino:trino-exchange-hdfs](https://central.sonatype.com/search?q=io.trino%3Atrino-exchange-hdfs)
198-
- {maven_download}`exchange-hdfs`
198+
- {github_release_download}`exchange-hdfs`
199199
* - faker
200200
- [](/connector/faker)
201201
- [io.trino:trino-faker](https://central.sonatype.com/search?q=io.trino%3Atrino-faker)
202-
- {maven_download}`faker`
202+
- {github_release_download}`faker`
203203
* - functions-python
204204
- [](/udf/python)
205205
- [io.trino:trino-functions-python](https://central.sonatype.com/search?q=io.trino%3Atrino-functions-python)
206-
- {maven_download}`functions-python`
206+
- {github_release_download}`functions-python`
207207
* - geospatial
208208
- [](/functions/geospatial)
209209
- [io.trino:trino-geospatial](https://central.sonatype.com/search?q=io.trino%3Atrino-geospatial)
210-
- {maven_download}`geospatial`
210+
- {github_release_download}`geospatial`
211211
* - google-sheets
212212
- [](/connector/googlesheets)
213213
- [io.trino:trino-google-sheets](https://central.sonatype.com/search?q=io.trino%3Atrino-google-sheets)
214-
- {maven_download}`google-sheets`
214+
- {github_release_download}`google-sheets`
215215
* - hive
216216
- [](/connector/hive)
217217
- [io.trino:trino-hive](https://central.sonatype.com/search?q=io.trino%3Atrino-hive)
218-
- {maven_download}`hive`
218+
- {github_release_download}`hive`
219219
* - http-event-listener
220220
- [](/admin/event-listeners-http)
221221
- [io.trino:trino-http-event-listener](https://central.sonatype.com/search?q=io.trino%3Atrino-http-event-listener)
222-
- {maven_download}`http-event-listener`
222+
- {github_release_download}`http-event-listener`
223223
* - http-server-event-listener
224224
- HTTP server event listener
225225
- [io.trino:trino-http-server-event-listener](https://central.sonatype.com/search?q=io.trino%3Atrino-http-server-event-listener)
226-
- {maven_download}`http-server-event-listener`
226+
- {github_release_download}`http-server-event-listener`
227227
* - hudi
228228
- [](/connector/hudi)
229229
- [io.trino:trino-hudi](https://central.sonatype.com/search?q=io.trino%3Atrino-hudi)
230-
- {maven_download}`hudi`
230+
- {github_release_download}`hudi`
231231
* - iceberg
232232
- [](/connector/iceberg)
233233
- [io.trino:trino-iceberg](https://central.sonatype.com/search?q=io.trino%3Atrino-iceberg)
234-
- {maven_download}`iceberg`
234+
- {github_release_download}`iceberg`
235235
* - ignite
236236
- [](/connector/ignite)
237237
- [io.trino:trino-ignite](https://central.sonatype.com/search?q=io.trino%3Atrino-ignite)
238-
- {maven_download}`ignite`
238+
- {github_release_download}`ignite`
239239
* - jmx
240240
- [](/connector/jmx)
241241
- [io.trino:trino-jmx](https://central.sonatype.com/search?q=io.trino%3Atrino-jmx)
242-
- {maven_download}`jmx`
242+
- {github_release_download}`jmx`
243243
* - kafka
244244
- [](/connector/kafka)
245245
- [io.trino:trino-kafka](https://central.sonatype.com/search?q=io.trino%3Atrino-kafka)
246-
- {maven_download}`kafka`
246+
- {github_release_download}`kafka`
247247
* - kafka-event-listener
248248
- [](/admin/event-listeners-kafka)
249249
- [io.trino:trino-kafka-event-listener](https://central.sonatype.com/search?q=io.trino%3Atrino-kafka-event-listener)
250-
- {maven_download}`kafka-event-listener`
250+
- {github_release_download}`kafka-event-listener`
251251
* - loki
252252
- [](/connector/loki)
253253
- [io.trino:trino-loki](https://central.sonatype.com/search?q=io.trino%3Atrino-loki)
254-
- {maven_download}`loki`
254+
- {github_release_download}`loki`
255255
* - mariadb
256256
- [](/connector/mariadb)
257257
- [io.trino:trino-mariadb](https://central.sonatype.com/search?q=io.trino%3Atrino-mariadb)
258-
- {maven_download}`mariadb`
258+
- {github_release_download}`mariadb`
259259
* - memory
260260
- [](/connector/memory)
261261
- [io.trino:trino-memory](https://central.sonatype.com/search?q=io.trino%3Atrino-memory)
262-
- {maven_download}`memory`
262+
- {github_release_download}`memory`
263263
* - ml
264264
- [](/functions/ml)
265265
- [io.trino:trino-ml](https://central.sonatype.com/search?q=io.trino%3Atrino-ml)
266-
- {maven_download}`ml`
266+
- {github_release_download}`ml`
267267
* - mongodb
268268
- [](/connector/mongodb)
269269
- [io.trino:trino-mongodb](https://central.sonatype.com/search?q=io.trino%3Atrino-mongodb)
270-
- {maven_download}`mongodb`
270+
- {github_release_download}`mongodb`
271271
* - mysql
272272
- [](/connector/mysql)
273273
- [io.trino:trino-mysql](https://central.sonatype.com/search?q=io.trino%3Atrino-mysql)
274-
- {maven_download}`mysql`
274+
- {github_release_download}`mysql`
275275
* - mysql-event-listener
276276
- [](/admin/event-listeners-mysql)
277277
- [io.trino:trino-mysql-event-listener](https://central.sonatype.com/search?q=io.trino%3Atrino-mysql-event-listener)
278-
- {maven_download}`mysql-event-listener`
278+
- {github_release_download}`mysql-event-listener`
279279
* - opa
280280
- [](/security/opa-access-control)
281281
- [io.trino:trino-opa](https://central.sonatype.com/search?q=io.trino%3Atrino-opa)
282-
- {maven_download}`opa`
282+
- {github_release_download}`opa`
283283
* - openlineage
284284
- [](/admin/event-listeners-openlineage)
285285
- [io.trino:trino-openlineage](https://central.sonatype.com/search?q=io.trino%3Atrino-openlineage)
286-
- {maven_download}`openlineage`
286+
- {github_release_download}`openlineage`
287287
* - opensearch
288288
- [](/connector/opensearch)
289289
- [io.trino:trino-opensearch](https://central.sonatype.com/search?q=io.trino%3Atrino-opensearch)
290-
- {maven_download}`opensearch`
290+
- {github_release_download}`opensearch`
291291
* - oracle
292292
- [](/connector/oracle)
293293
- [io.trino:trino-oracle](https://central.sonatype.com/search?q=io.trino%3Atrino-oracle)
294-
- {maven_download}`oracle`
294+
- {github_release_download}`oracle`
295295
* - password-authenticators
296296
- Password authentication
297297
- [io.trino:trino-password-authenticators](https://central.sonatype.com/search?q=io.trino%3Atrino-password-authenticators)
298-
- {maven_download}`password-authenticators`
298+
- {github_release_download}`password-authenticators`
299299
* - pinot
300300
- [](/connector/pinot)
301301
- [io.trino:trino-pinot](https://central.sonatype.com/search?q=io.trino%3Atrino-pinot)
302-
- {maven_download}`pinot`
302+
- {github_release_download}`pinot`
303303
* - postgresql
304304
- [](/connector/postgresql)
305305
- [io.trino:trino-postgresql](https://central.sonatype.com/search?q=io.trino%3Atrino-postgresql)
306-
- {maven_download}`postgresql`
306+
- {github_release_download}`postgresql`
307307
* - prometheus
308308
- [](/connector/prometheus)
309309
- [io.trino:trino-prometheus](https://central.sonatype.com/search?q=io.trino%3Atrino-prometheus)
310-
- {maven_download}`prometheus`
310+
- {github_release_download}`prometheus`
311311
* - ranger
312312
- [](/security/ranger-access-control)
313313
- [io.trino:trino-ranger](https://central.sonatype.com/search?q=io.trino%3Atrino-ranger)
314-
- {maven_download}`ranger`
314+
- {github_release_download}`ranger`
315315
* - redis
316316
- [](/connector/redis)
317317
- [io.trino:trino-redis](https://central.sonatype.com/search?q=io.trino%3Atrino-redis)
318-
- {maven_download}`redis`
318+
- {github_release_download}`redis`
319319
* - redshift
320320
- [](/connector/redshift)
321321
- [io.trino:trino-redshift](https://central.sonatype.com/search?q=io.trino%3Atrino-redshift)
322-
- {maven_download}`redshift`
322+
- {github_release_download}`redshift`
323323
* - resource-group-managers
324324
- [](/admin/resource-groups)
325325
- [io.trino:trino-resource-group-managers](https://central.sonatype.com/search?q=io.trino%3Atrino-resource-group-managers)
326-
- {maven_download}`resource-group-managers`
326+
- {github_release_download}`resource-group-managers`
327327
* - session-property-managers
328328
- [](/admin/session-property-managers)
329329
- [io.trino:trino-session-property-managers](https://central.sonatype.com/search?q=io.trino%3Atrino-session-property-managers)
330-
- {maven_download}`session-property-managers`
330+
- {github_release_download}`session-property-managers`
331331
* - singlestore
332332
- [](/connector/singlestore)
333333
- [io.trino:trino-singlestore](https://central.sonatype.com/search?q=io.trino%3Atrino-singlestore)
334-
- {maven_download}`singlestore`
334+
- {github_release_download}`singlestore`
335335
* - snowflake
336336
- [](/connector/snowflake)
337337
- [io.trino:trino-snowflake](https://central.sonatype.com/search?q=io.trino%3Atrino-snowflake)
338-
- {maven_download}`snowflake`
338+
- {github_release_download}`snowflake`
339339
* - spooling-filesystem
340340
- Server side support for [](protocol-spooling)
341341
- [io.trino:trino-spooling-filesystem](https://central.sonatype.com/search?q=io.trino%3Atrino-spooling-filesystem)
342-
- {maven_download}`spooling-filesystem`
342+
- {github_release_download}`spooling-filesystem`
343343
* - sqlserver
344344
- [](/connector/sqlserver)
345345
- [io.trino:trino-sqlserver](https://central.sonatype.com/search?q=io.trino%3Atrino-sqlserver)
346-
- {maven_download}`sqlserver`
346+
- {github_release_download}`sqlserver`
347347
* - teradata-functions
348348
- [](/functions/teradata)
349349
- [io.trino:trino-teradata-functions](https://central.sonatype.com/search?q=io.trino%3Atrino-teradata-functions)
350-
- {maven_download}`teradata-functions`
350+
- {github_release_download}`teradata-functions`
351351
* - thrift
352352
- [](/connector/thrift)
353353
- [io.trino:trino-thrift](https://central.sonatype.com/search?q=io.trino%3Atrino-thrift)
354-
- {maven_download}`thrift`
354+
- {github_release_download}`thrift`
355355
* - tpcds
356356
- [](/connector/tpcds)
357357
- [io.trino:trino-tpcds](https://central.sonatype.com/search?q=io.trino%3Atrino-tpcds)
358-
- {maven_download}`tpcds`
358+
- {github_release_download}`tpcds`
359359
* - tpch
360360
- [](/connector/tpch)
361361
- [io.trino:trino-tpch](https://central.sonatype.com/search?q=io.trino%3Atrino-tpch)
362-
- {maven_download}`tpch`
362+
- {github_release_download}`tpch`
363363
* - vertica
364364
- [](/connector/vertica)
365365
- [io.trino:trino-vertica](https://central.sonatype.com/search?q=io.trino%3Atrino-vertica)
366-
- {maven_download}`vertica`
366+
- {github_release_download}`vertica`
367367
:::

0 commit comments

Comments
 (0)