Skip to content

Commit 3fbcd17

Browse files
committed
Update release artifact download urls
Going forward, binary artifacts will be available under GitHub releases
1 parent bc3b3e1 commit 3fbcd17

File tree

1 file changed

+69
-71
lines changed

1 file changed

+69
-71
lines changed

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

Lines changed: 69 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -17,80 +17,78 @@
1717
# noinspection PyUnresolvedReferences
1818
from sphinx.errors import SphinxError
1919

20-
GROUP_ID = 'io.trino'
2120
ARTIFACTS = {
22-
'server': ('trino-server', 'tar.gz', None),
23-
'server-core': ('trino-server-core', 'tar.gz', None),
24-
'cli': ('trino-cli', 'jar', 'executable'),
25-
'jdbc': ('trino-jdbc', 'jar', None),
21+
'server': ('trino-server', 'tar.gz'),
22+
'server-core': ('trino-server-core', 'tar.gz'),
23+
'cli': ('trino-cli', None),
24+
'jdbc': ('trino-jdbc', 'jar'),
2625
#plugins
27-
'ai-functions': ('trino-ai-functions', 'zip', None),
28-
'bigquery': ('trino-bigquery', 'zip', None),
29-
'blackhole': ('trino-blackhole', 'zip', None),
30-
'cassandra': ('trino-cassandra', 'zip', None),
31-
'clickhouse': ('trino-clickhouse', 'zip', None),
32-
'delta-lake': ('trino-delta-lake', 'zip', None),
33-
'druid': ('trino-druid', 'zip', None),
34-
'duckdb': ('trino-duckdb', 'zip', None),
35-
'elasticsearch': ('trino-elasticsearch', 'zip', None),
36-
'example-http': ('trino-example-http', 'zip', None),
37-
'exasol': ('trino-exasol', 'zip', None),
38-
'exchange-filesystem': ('trino-exchange-filesystem', 'zip', None),
39-
'exchange-hdfs': ('trino-exchange-hdfs', 'zip', None),
40-
'faker': ('trino-faker', 'zip', None),
41-
'functions-python': ('trino-functions-python', 'zip', None),
42-
'geospatial': ('trino-geospatial', 'zip', None),
43-
'google-sheets': ('trino-google-sheets', 'zip', None),
44-
'hive': ('trino-hive', 'zip', None),
45-
'http-event-listener': ('trino-http-event-listener', 'zip', None),
46-
'http-server-event-listener': ('trino-http-server-event-listener', 'zip', None),
47-
'hudi': ('trino-hudi', 'zip', None),
48-
'iceberg': ('trino-iceberg', 'zip', None),
49-
'ignite': ('trino-ignite', 'zip', None),
50-
'jmx': ('trino-jmx', 'zip', None),
51-
'kafka': ('trino-kafka', 'zip', None),
52-
'kafka-event-listener': ('trino-kafka-event-listener', 'zip', None),
53-
'loki': ('trino-loki', 'zip', None),
54-
'mariadb': ('trino-mariadb', 'zip', None),
55-
'memory': ('trino-memory', 'zip', None),
56-
'ml': ('trino-ml', 'zip', None),
57-
'mongodb': ('trino-mongodb', 'zip', None),
58-
'mysql': ('trino-mysql', 'zip', None),
59-
'mysql-event-listener': ('trino-mysql-event-listener', 'zip', None),
60-
'opa': ('trino-opa', 'zip', None),
61-
'openlineage': ('trino-openlineage', 'zip', None),
62-
'opensearch': ('trino-opensearch', 'zip', None),
63-
'oracle': ('trino-oracle', 'zip', None),
64-
'password-authenticators': ('trino-password-authenticators', 'zip', None),
65-
'pinot': ('trino-pinot', 'zip', None),
66-
'postgresql': ('trino-postgresql', 'zip', None),
67-
'prometheus': ('trino-prometheus', 'zip', None),
68-
'ranger': ('trino-ranger', 'zip', None),
69-
'redis': ('trino-redis', 'zip', None),
70-
'redshift': ('trino-redshift', 'zip', None),
71-
'resource-group-managers': ('trino-resource-group-managers', 'zip', None),
72-
'session-property-managers': ('trino-session-property-managers', 'zip', None),
73-
'singlestore': ('trino-singlestore', 'zip', None),
74-
'snowflake': ('trino-snowflake', 'zip', None),
75-
'spooling-filesystem': ('trino-spooling-filesystem', 'zip', None),
76-
'sqlserver': ('trino-sqlserver', 'zip', None),
77-
'teradata-functions': ('trino-teradata-functions', 'zip', None),
78-
'thrift': ('trino-thrift', 'zip', None),
79-
'tpcds': ('trino-tpcds', 'zip', None),
80-
'tpch': ('trino-tpch', 'zip', None),
81-
'vertica': ('trino-vertica', 'zip', None),
26+
'ai-functions': ('trino-ai-functions', 'zip'),
27+
'bigquery': ('trino-bigquery', 'zip'),
28+
'blackhole': ('trino-blackhole', 'zip'),
29+
'cassandra': ('trino-cassandra', 'zip'),
30+
'clickhouse': ('trino-clickhouse', 'zip'),
31+
'delta-lake': ('trino-delta-lake', 'zip'),
32+
'druid': ('trino-druid', 'zip'),
33+
'duckdb': ('trino-duckdb', 'zip'),
34+
'elasticsearch': ('trino-elasticsearch', 'zip'),
35+
'example-http': ('trino-example-http', 'zip'),
36+
'exasol': ('trino-exasol', 'zip'),
37+
'exchange-filesystem': ('trino-exchange-filesystem', 'zip'),
38+
'exchange-hdfs': ('trino-exchange-hdfs', 'zip'),
39+
'faker': ('trino-faker', 'zip'),
40+
'functions-python': ('trino-functions-python', 'zip'),
41+
'geospatial': ('trino-geospatial', 'zip'),
42+
'google-sheets': ('trino-google-sheets', 'zip'),
43+
'hive': ('trino-hive', 'zip'),
44+
'http-event-listener': ('trino-http-event-listener', 'zip'),
45+
'http-server-event-listener': ('trino-http-server-event-listener', 'zip'),
46+
'hudi': ('trino-hudi', 'zip'),
47+
'iceberg': ('trino-iceberg', 'zip'),
48+
'ignite': ('trino-ignite', 'zip'),
49+
'jmx': ('trino-jmx', 'zip'),
50+
'kafka': ('trino-kafka', 'zip'),
51+
'kafka-event-listener': ('trino-kafka-event-listener', 'zip'),
52+
'loki': ('trino-loki', 'zip'),
53+
'mariadb': ('trino-mariadb', 'zip'),
54+
'memory': ('trino-memory', 'zip'),
55+
'ml': ('trino-ml', 'zip'),
56+
'mongodb': ('trino-mongodb', 'zip'),
57+
'mysql': ('trino-mysql', 'zip'),
58+
'mysql-event-listener': ('trino-mysql-event-listener', 'zip'),
59+
'opa': ('trino-opa', 'zip'),
60+
'openlineage': ('trino-openlineage', 'zip'),
61+
'opensearch': ('trino-opensearch', 'zip'),
62+
'oracle': ('trino-oracle', 'zip'),
63+
'password-authenticators': ('trino-password-authenticators', 'zip'),
64+
'pinot': ('trino-pinot', 'zip'),
65+
'postgresql': ('trino-postgresql', 'zip'),
66+
'prometheus': ('trino-prometheus', 'zip'),
67+
'ranger': ('trino-ranger', 'zip'),
68+
'redis': ('trino-redis', 'zip'),
69+
'redshift': ('trino-redshift', 'zip'),
70+
'resource-group-managers': ('trino-resource-group-managers', 'zip'),
71+
'session-property-managers': ('trino-session-property-managers', 'zip'),
72+
'singlestore': ('trino-singlestore', 'zip'),
73+
'snowflake': ('trino-snowflake', 'zip'),
74+
'spooling-filesystem': ('trino-spooling-filesystem', 'zip'),
75+
'sqlserver': ('trino-sqlserver', 'zip'),
76+
'teradata-functions': ('trino-teradata-functions', 'zip'),
77+
'thrift': ('trino-thrift', 'zip'),
78+
'tpcds': ('trino-tpcds', 'zip'),
79+
'tpch': ('trino-tpch', 'zip'),
80+
'vertica': ('trino-vertica', 'zip'),
8281
}
8382

84-
def maven_filename(artifact, version, packaging, classifier):
85-
classifier = '-' + classifier if classifier else ''
86-
return '%s-%s%s.%s' % (artifact, version, classifier, packaging)
83+
def filename(artifact, version, extension):
84+
extension = '.' + extension if extension else ''
85+
return artifact + '-' + version + extension
8786

8887

89-
def maven_download(group, artifact, version, packaging, classifier):
90-
base = 'https://repo1.maven.org/maven2/'
91-
group_path = group.replace('.', '/')
92-
filename = maven_filename(artifact, version, packaging, classifier)
93-
return base + '/'.join((group_path, artifact, version, filename))
88+
def download_url(artifact, version, extension):
89+
base = 'https://github.com/trinodb/trino/releases/download'
90+
file = filename(artifact, version, extension)
91+
return '%s/%s/%s' % (base, version, file)
9492

9593

9694
def setup(app):
@@ -102,10 +100,10 @@ def download_link_role(role, rawtext, text, lineno, inliner, options={}, content
102100
inliner.reporter.error('Unsupported download type: ' + text, line=lineno)
103101
return [], []
104102

105-
artifact, packaging, classifier = ARTIFACTS[text]
103+
artifact, extension = ARTIFACTS[text]
106104

107-
title = maven_filename(artifact, version, packaging, classifier)
108-
uri = maven_download(GROUP_ID, artifact, version, packaging, classifier)
105+
title = filename(artifact, version, extension)
106+
uri = download_url(artifact, version, extension)
109107

110108
node = nodes.reference(title, title, internal=False, refuri=uri)
111109

0 commit comments

Comments
 (0)