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 installer downloads for specific releases #1976

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

mjpieters
Copy link
Contributor

Github download urls for a specific release uses the pattern ../releases/download/[RELEASE]/.., which differs from the latest release URL which uses ../releases/latest/download/...

For convenience, if BINSTALL_VERSION is set but doesn't start with v, the v is prefixed.

Fixes #1974

Copy link
Member

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mjpieters
Copy link
Contributor Author

Thanks!

Heads-up, I added a second commit that ensures that the install script is tested with and without the BINSTALL_VERSION environment variable, so regressions can be caught in future.

@mjpieters mjpieters force-pushed the fix-install-script branch 2 times, most recently from 8111fa2 to 8ec2195 Compare November 19, 2024 13:45
Github download urls for a specific release uses the pattern `../releases/download/[RELEASE]/..`, which differs from the latest release URL which uses `../releases/latest/download/..`.

For convenience, if `BINSTALL_VERSION` is set but doesn't start with `v`, the v is prefixed.
@mjpieters mjpieters force-pushed the fix-install-script branch 2 times, most recently from 3a55c3a to 8f30b72 Compare November 19, 2024 13:53
@mjpieters
Copy link
Contributor Author

Right, reasonably confident now that the workflow will now pass.

@NobodyXu NobodyXu enabled auto-merge November 19, 2024 13:59
@NobodyXu NobodyXu added this pull request to the merge queue Nov 19, 2024
- name: Set `BINSTALL_VERSION`
if: matrix.set_binstall_version != 'no'
env:
STRIP_V: ${{ matrix.set_cargo_home == 'with-v' && '1' || '' }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not working as I intended it to.

The variable is empty regardless of the value of matrix.set_cargo_home. I'll have to do a bit of research.

Copy link
Contributor Author

@mjpieters mjpieters Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've pushed an update; instead of fighting with Github Actions expression syntax, the matrix value is copied directly into the environment variable and the step then tests for without-v in bash to make the strip-or-not call.

@NobodyXu: All this means I need another workflow run approval. Sorry for the run-around on this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, it has been merged!

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 19, 2024
When running the install-script workflow in Github Actions, add matrix
options for not setting the variable, setting it to the latest release
with the `v` prefix, and setting it to the latest release without the
`v` prefix.
@mjpieters mjpieters requested a review from NobodyXu November 19, 2024 20:51
@NobodyXu NobodyXu enabled auto-merge November 20, 2024 08:05
@NobodyXu NobodyXu added this pull request to the merge queue Nov 20, 2024
Merged via the queue into cargo-bins:main with commit 266e627 Nov 20, 2024
50 checks passed
@mjpieters mjpieters deleted the fix-install-script branch November 20, 2024 08:52
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.

Installer uses wrong download URL for versions other than 'latest'
2 participants