Skip to content
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

gradle and maven plugin should be updated to use https://jbang.dev based urls #722

Open
maxandersen opened this issue Feb 12, 2021 · 4 comments

Comments

@maxandersen
Copy link
Collaborator

jbang itself now uses: https://www.jbang.dev/releases/latest/download/version.txt as version check
and latest download is always available at https://www.jbang.dev/releases/latest/download/jbang.zip

should get maven and gradle plugins updated to use these too.

@aalmiray
Copy link
Contributor

aalmiray commented Mar 4, 2021

AFAICT https://www.jbang.dev/releases/latest/download/version.txt redirects to https://github.com/jbangdev/jbang/releases/latest/download/version.txt which in turn redirects to https://github.com/jbangdev/jbang/releases/download/v0.66.1/version.txt (as of 0.66.1 being the latest release).

Which redirects once more to

$ curl -i https://github.com/jbangdev/jbang/releases/download/v0.66.1/version.txt
HTTP/2 302 
server: GitHub.com
date: Thu, 04 Mar 2021 20:27:44 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, Accept-Encoding, Accept, X-Requested-With
location: https://github-releases.githubusercontent.com/230011262/fabccf00-6fdf-11eb-9e5d-928f0fc9b427?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210304%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210304T202744Z&X-Amz-Expires=300&X-Amz-Signature=e47e2f6dd85de209bee658c79acb06f90c00472a6f9189107a0c456143bd669f&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=230011262&response-content-disposition=attachment%3B%20filename%3Dversion.txt&response-content-type=application%2Foctet-stream
cache-control: no-cache
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: no-referrer-when-downgrade
expect-ct: max-age=2592000, report-uri="https://api.github.com/_private/browser/errors"
content-security-policy: default-src 'none'; base-uri 'self'; block-all-mixed-content; connect-src 'self' uploads.github.com www.githubstatus.com collector.githubapp.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com cdn.optimizely.com logx.optimizely.com/v1/events wss://alive.github.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com online.visualstudio.com/api/v1/locations; font-src github.githubassets.com; form-action 'self' github.com gist.github.com; frame-ancestors 'none'; frame-src render.githubusercontent.com; img-src 'self' data: github.githubassets.com identicons.github.com collector.githubapp.com github-cloud.s3.amazonaws.com user-images.githubusercontent.com/ *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; worker-src github.com/socket-worker-5029ae85.js gist.github.com/socket-worker-5029ae85.js
content-length: 619
x-github-request-id: C0F0:13BEB:467F2A:485CB0:604142C0

<html><body>You are being <a href="https://github-releases.githubusercontent.com/230011262/fabccf00-6fdf-11eb-9e5d-928f0fc9b427?X-Amz-Algorithm=AWS4-HMAC-SHA256&amp;X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210304%2Fus-east-1%2Fs3%2Faws4_request&amp;X-Amz-Date=20210304T202744Z&amp;X-Amz-Expires=300&amp;X-Amz-Signature=e47e2f6dd85de209bee658c79acb06f90c00472a6f9189107a0c456143bd669f&amp;X-Amz-SignedHeaders=host&amp;actor_id=0&amp;key_id=0&amp;repo_id=230011262&amp;response-content-disposition=attachment%3B%20filename%3Dversion.txt&amp;response-content-type=application%2Foctet-stream">redirected</a>.</body></html>

@maxandersen
Copy link
Collaborator Author

 curl -L https://www.jbang.dev/releases/latest/download/version.txt
0.66.1%

right?

@aalmiray
Copy link
Contributor

aalmiray commented Mar 4, 2021

Sure, just trying to figure out redirects for the Gradle plugin.

@gastaldi
Copy link
Contributor

gastaldi commented Mar 24, 2021

To make this work in the JBang Maven plugin, the Maven Download Plugin needs to support Follow Redirects. Luckily I provided a PR for it: maven-download-plugin/maven-download-plugin#181

gastaldi added a commit to jbangdev/jbang-maven-plugin that referenced this issue Mar 24, 2021
gastaldi added a commit to jbangdev/jbang-maven-plugin that referenced this issue Mar 24, 2021
gastaldi added a commit to jbangdev/jbang-maven-plugin that referenced this issue Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants