-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Update download links in docs for GitHub releases #26473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -85,6 +85,10 @@ def maven_filename(artifact, version, packaging, classifier): | |
| classifier = '-' + classifier if classifier else '' | ||
| return '%s-%s%s.%s' % (artifact, version, classifier, packaging) | ||
|
|
||
| def github_release_download(group, artifact, version, packaging, classifier): | ||
| base = 'https://github.com/trinodb/trino/releases/download/' | ||
| filename = maven_filename(artifact, version, packaging, classifier) | ||
| return base + '/' + version + '/' + filename | ||
|
|
||
| def maven_download(group, artifact, version, packaging, classifier): | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if you prefer we can also get rid of the old one.. |
||
| base = 'https://repo1.maven.org/maven2/' | ||
|
|
@@ -95,7 +99,7 @@ def maven_download(group, artifact, version, packaging, classifier): | |
|
|
||
| def setup(app): | ||
| # noinspection PyDefaultArgument,PyUnusedLocal | ||
| def download_link_role(role, rawtext, text, lineno, inliner, options={}, content=[]): | ||
| def maven_link_role(role, rawtext, text, lineno, inliner, options={}, content=[]): | ||
| version = app.config.release | ||
|
|
||
| if not text in ARTIFACTS: | ||
|
|
@@ -110,7 +114,25 @@ def download_link_role(role, rawtext, text, lineno, inliner, options={}, content | |
| node = nodes.reference(title, title, internal=False, refuri=uri) | ||
|
|
||
| return [node], [] | ||
| app.add_role('maven_download', download_link_role) | ||
|
|
||
| def github_link_role(role, rawtext, text, lineno, inliner, options={}, content=[]): | ||
| version = app.config.release | ||
|
|
||
| if not text in ARTIFACTS: | ||
| inliner.reporter.error('Unsupported download type: ' + text, line=lineno) | ||
| return [], [] | ||
|
|
||
| artifact, packaging, classifier = ARTIFACTS[text] | ||
|
|
||
| title = maven_filename(artifact, version, packaging, classifier) | ||
| uri = github_release_download(GROUP_ID, artifact, version, packaging, classifier) | ||
|
|
||
| node = nodes.reference(title, title, internal=False, refuri=uri) | ||
|
|
||
| return [node], [] | ||
|
|
||
| app.add_role('maven_download', maven_link_role) | ||
| app.add_role('github_release_download', github_link_role) | ||
|
|
||
| return { | ||
| 'parallel_read_safe': True, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the link should depend on version right? 477+ will be github
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah .. @martint is working on that - see https://github.com/trinodb/trino/releases/tag/477-test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See next line.. it adds the version folder there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And yeah .. we merge this before we cut 477