-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat(spin): add new module for Spin #6238
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Thorsten Hans <[email protected]>
Signed-off-by: Thorsten Hans <[email protected]>
9736d10
to
74693eb
Compare
src/modules/spin.rs
Outdated
let capture = semver_regex.find(input)?.as_str(); | ||
if input.contains(SPIN_CANARY_IDENTIFIER) { | ||
Some(format!("{} ({})", capture, SPIN_CANARY)) | ||
} else { | ||
Some(capture.to_string()) | ||
} |
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.
Why do you replace pre
in the version name with canary
?
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.
Initially I thought it would be more self-explaining. However, you're right, 2.8.0 (pre)
makes more sense than 2.8.0 (canary)
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 am not sure if rewriting the version here at all is a good idea.
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.
Okay, I changed the implementation to use versions provided by spin --version
as they are
Signed-off-by: Thorsten Hans <[email protected]>
Signed-off-by: Thorsten Hans <[email protected]>
@davidkna any chance to get a new review? |
…by spin Signed-off-by: Thorsten Hans <[email protected]>
Signed-off-by: Thorsten Hans <[email protected]>
Co-authored-by: David Knaack <[email protected]>
Co-authored-by: David Knaack <[email protected]>
Co-authored-by: David Knaack <[email protected]>
Co-authored-by: David Knaack <[email protected]>
Signed-off-by: Thorsten Hans <[email protected]>
Description
This PR adds a new module for Spin, allowing Spin users to display the currently installed version of the Spin CLI in their prompt.
Motivation and Context
As a developer using Spin to build WebAssembly applications, I want to display the current version of Spin as part of my prompt. This is especially useful for Spin users that leverage Spin's version manager to switch between multiple versions of Spin on their machine.
Screenshots (if appropriate):
How Has This Been Tested?
I installed Spin CLI on my machine using homebrew (
brew install fermyon/tap/spin
), and updated mystarship.toml
by adding:To display the currently installed version of Spin also outside of Spin App directories, I set the
permanent
option totrue
.Checklist: