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

fix: Homepage no longer downloaded on script #6232

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

notPlancha
Copy link

Note: this is the same as #6230 and #6090 but I didn't know renaming the branch would close them automatically, oops.

Description

Wrapped GET homepage logic in an if/else. I am not sure if this is the best option, or if this is breaking at all (I don't think it is but I'm not completly sure)

Motivation and Context

Currently checkver.ps1 GETs the homepage, even if script is specified, and does nothing with it. This becomes an issue when the homepage doesn't return a 2xx, like a timeout, or a 403 Forbiden (like cloudflare does). I don't see any reason this is the case.
For example

> git clone https://github.com/kazzarin/bucket.git
> cd bucket
> git checkout 22fb2662e9143a1712b5d806abfc2b9947b65e60 # "homepage": "https://www.oracle.com/java/graalvm/",
> .\bin\checkver.ps1 oracle-graalvm
oracle-graalvm: The remote server returned an error: (403) Forbidden.
URL https://www.oracle.com/java/graalvm/ is not valid
> git checkout 56732b8d74f4babfbd3400ff43829dd2b08ec36d # "homepage": "https://www.graalvm.org/",
>  .\bin\checkver.ps1 oracle-graalvm
oracle-graalvm: 23 (scoop version is 21.0.1) autoupdate available
> git diff 56732b8d74f4babfbd3400ff43829dd2b08ec36d 22fb2662e9143a1712b5d806abfc2b9947b65e60 -- .\bucket\oracle-graalvm.json

fixes #5704,
closes #6090 (was merging with master)

How Has This Been Tested?

> if (!$env:SCOOP_HOME) { $env:SCOOP_HOME = Convert-Path (scoop prefix scoop) }
> irm -Uri https://raw.githubusercontent.com/notPlancha/Scoop/1453b84/bin/checkver.ps1 > $env:SCOOP_HOME/bin/checkver.ps1
> git checkout 22fb26 # "homepage": "https://www.oracle.com/java/graalvm/",
> .\bin\checkver.ps1 oracle-graalvm
oracle-graalvm: 23 (scoop version is 21.0.1) autoupdate available
>  git checkout 56732 # "homepage": "https://www.graalvm.org/",
> .\bin\checkver.ps1 oracle-graalvm
oracle-graalvm: 23 (scoop version is 21.0.1) autoupdate available

Checklist:

  • I have read the Contributing Guide.
  • I have ensured that I am targeting the develop branch.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.
  • I have added an entry in the CHANGELOG.

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

Successfully merging this pull request may close these issues.

1 participant