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

Set $VERSION statically in curl installer #88

Closed
EverlastingBugstopper opened this issue Nov 19, 2020 · 3 comments · Fixed by #324
Closed

Set $VERSION statically in curl installer #88

EverlastingBugstopper opened this issue Nov 19, 2020 · 3 comments · Fixed by #324
Assignees
Labels
feature 🎉 new commands, flags, functionality, and improved error messages
Milestone

Comments

@EverlastingBugstopper
Copy link
Contributor

right now it's required to have a $VERSION variable set before the curl installer works. this should be set automatically either in our release process by parsing from Cargo.toml, or by the installer itself checking for $VERSION and then making a separate HTTP request to figure out the latest version released on github. i'm not sure which one i like better, the first one is more performant (eliminates one round trip to github), whereas the second one might be a bit easier.

@EverlastingBugstopper
Copy link
Contributor Author

@jbaxleyiii had this idea which would work just fine

@jbaxleyiii
Copy link

This should mostly be supported already via spaceport.

  1. We need to adjust the url to the rover repo here https://github.com/apollographql/spaceport/blob/main/src/routes/cli.ts#L6
  2. Ensure that the binary matches the naming here (or actually change it (for instance ap needs to be rover) https://github.com/apollographql/spaceport/blob/main/src/routes/cli.ts#L35) and send the correct platform as part of the request https://github.com/apollographql/spaceport/blob/main/src/routes/cli.ts#L9
  3. As a backup, it would be great to upload the binaries straight to cloudflare storage so that our cache is already warm https://github.com/apollographql/spaceport/blob/main/src/routes/cli.ts#L36

The benefit here is we have edge caching and usage analtyics already built in https://github.com/apollographql/spaceport/blob/main/src/routes/cli.ts#L40-L51 and the CLI / shell scripts can be much simpler.

@EverlastingBugstopper EverlastingBugstopper changed the title figure out how to set $VERSION automatically in curl installer figure out how to set $VERSION automatically in curl/powershell installers Feb 3, 2021
@lrlna lrlna modified the milestones: 0.0.2, 0.0.3 Feb 19, 2021
@lrlna lrlna mentioned this issue Feb 19, 2021
2 tasks
@JakeDawkins JakeDawkins added feature 🎉 new commands, flags, functionality, and improved error messages and removed operations - feature labels Feb 22, 2021
@JakeDawkins
Copy link
Contributor

After looking at this, it feels weird to me that an install script (which itself is versioned and released with versioned tags) would be responsible for downloading/installing any version of Rover. I think it makes more sense to have the script be static, and use another source, like spaceport, to point at the right script.

So curl -sSL https://raw.githubusercontent.com/apollographql/rover/v0.0.2/installers/binstall/scripts/nix/install.sh | sh would always download and install v0.0.2 of Rover.

@JakeDawkins JakeDawkins changed the title figure out how to set $VERSION automatically in curl/powershell installers Set $VERSION statically in curl installer Mar 2, 2021
@JakeDawkins JakeDawkins self-assigned this Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🎉 new commands, flags, functionality, and improved error messages
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants