-
Notifications
You must be signed in to change notification settings - Fork 304
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
Install and setup spin cli #6810
Conversation
494a720
to
7be2d84
Compare
// maybe use 'static-linux' if we run into GLIBC compat issues with the default Linux build | ||
const platform = context.goPlatform === 'darwin' ? 'macos' : context.goPlatform; | ||
const baseURL = `https://github.com/${ this.githubOwner }/${ this.githubRepo }/releases/download/v${ context.versions.spinCLI }`; | ||
const archiveName = `spin-v${ context.versions.spinCLI }-${ platform }-${ arch }${ context.goPlatform.startsWith('win') ? '.zip' : '.tar.gz' }`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have an issue about the vcruntime dependency on Windows? (Don't need to solve it in this PR, but we should track it.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is fermyon/spin#1504 to track this upstream. I don't know what we can do about it right now. I'm hoping upstream will switch to a static build. If they don't, then I think we should add a diagnostic checking for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've since created #6862 to track this here as well.
I just did another force-push because I wanted to rebase on latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're always installing from main
; do we not want to pin it (to a hash or tag or something) instead?
I still don't like the shell script, but we can change that later I guess. I just worry that untangling it in a later release will be annoying.
I am not very confident in my review; if the things I bring up are not a thing, let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're always installing from main; do we not want to pin it (to a hash or tag or something) instead?
I know, it bothers me too, but that is what Fermyon is doing in their own installer, even when you specify a specific version of the spin
app to be installed (see https://developer.fermyon.com/downloads/install.sh):
./spin templates install --git "https://github.com/fermyon/spin" --upgrade
./spin templates install --git "https://github.com/fermyon/spin-python-sdk" --upgrade
./spin templates install --git "https://github.com/fermyon/spin-js-sdk" --upgrade
We can revisit this in the context of #6715.
I still don't like the shell script, but we can change that later I guess. I just worry that untangling it in a later release will be annoying.
Not sure what that means; what needs to be untangled?
// maybe use 'static-linux' if we run into GLIBC compat issues with the default Linux build | ||
const platform = context.goPlatform === 'darwin' ? 'macos' : context.goPlatform; | ||
const baseURL = `https://github.com/${ this.githubOwner }/${ this.githubRepo }/releases/download/v${ context.versions.spinCLI }`; | ||
const archiveName = `spin-v${ context.versions.spinCLI }-${ platform }-${ arch }${ context.goPlatform.startsWith('win') ? '.zip' : '.tar.gz' }`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've since created #6862 to track this here as well.
b5cc5fa
to
328639d
Compare
Signed-off-by: Jan Dubois <[email protected]>
Signed-off-by: Jan Dubois <[email protected]>
We only install templates and plugins when the there are non installed before. If the user has already configured spin, then we don't want to modify their setup, as we would overwrite them on each app start. Signed-off-by: Jan Dubois <[email protected]>
Signed-off-by: Jan Dubois <[email protected]>
Signed-off-by: Jan Dubois <[email protected]>
Puts
spin
on thePATH
and installs default templates and plugins if there are none installed at all yet.