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

feat(cargo-shuttle): Add upgrade subcommand to run install script #1848

Merged
merged 3 commits into from
Sep 19, 2024

Conversation

supleed2
Copy link
Contributor

@supleed2 supleed2 commented Jul 28, 2024

Description of change

Adds a function that spawns a child process running the install command, using conditional compilation based on target family (unix vs windows). Closes #1840

How has this been tested? (if applicable)

  • Ran cargo run --bin cargo-shuttle -- upgrade on Windows
    • With latest cargo-shuttle installed: got the expected message that my cargo-shuttle version is latest from binstall
    • Without cargo-shuttle, with cargo-binstall: got output from binstall that binary was downloaded from GitHub
    • Without cargo-shuttle and cargo-binstall: directly downloads binary which works (I realise we didn't add the prompts to the powershell version)
  • Ran cargo run --bin cargo-shuttle -- upgrade on Ubuntu
    • With latest cargo-shuttle installed: got the expected message that my cargo-shuttle version is up-to-date from the bash script
    • Without cargo-shuttle, with cargo-binstall: got output from binstall that binary was downloaded from GitHub
    • Without cargo-shuttle and cargo-binstall: got prompts to download binary directly which works, and to install from source via cargo which also works

@jonaro00
Copy link
Member

Can you also test the interactivity of the subprocess, i.e. that the y/n prompts work as intended when you don't have cargo-binstall?

@supleed2
Copy link
Contributor Author

Thanks for the reminder, just ran through the other scenarios and updated my comment.

@jonaro00 jonaro00 merged commit 243daff into shuttle-hq:main Sep 19, 2024
24 of 25 checks passed
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.

[Feature]: cargo shuttle upgrade
2 participants