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: hide fvm self install from and help introduce fvm self update #3724

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/fluvio-version-manager/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fluvio-version-manager"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
authors = ["Fluvio Contributors <team@fluvio.io>"]
description = "Fluvio Version Manager"
Expand Down
6 changes: 6 additions & 0 deletions crates/fluvio-version-manager/src/command/itself/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

pub mod install;
pub mod uninstall;
pub mod update;

use anyhow::Result;
use clap::Parser;
Expand All @@ -10,13 +11,17 @@ use crate::common::notify::Notify;

use self::install::SelfInstallOpt;
use self::uninstall::SelfUninstallOpt;
use self::update::SelfUpdateOpt;

#[derive(Debug, Parser)]
pub enum ItselfCommand {
/// Install `fvm` and setup the workspace
#[clap(hide = true)]
Install(SelfInstallOpt),
/// Uninstall `fvm` and removes the workspace
Uninstall(SelfUninstallOpt),
/// Prints `fvm` update instructions
Update(SelfUpdateOpt),
}

/// The `install` command is responsible of installing the desired Package Set
Expand All @@ -32,6 +37,7 @@ impl SelfOpt {
match &self.command {
ItselfCommand::Install(cmd) => cmd.process(notify).await?,
ItselfCommand::Uninstall(cmd) => cmd.process(notify).await?,
ItselfCommand::Update(cmd) => cmd.process(notify).await?,
}

Ok(())
Expand Down
15 changes: 15 additions & 0 deletions crates/fluvio-version-manager/src/command/itself/update.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use anyhow::Result;
use clap::Parser;

use crate::common::notify::Notify;

#[derive(Clone, Debug, Parser)]
pub struct SelfUpdateOpt;

impl SelfUpdateOpt {
pub async fn process(&self, notify: Notify) -> Result<()> {
notify.info("To update fvm, please run:");
notify.info("curl -fsS https://hub.infinyon.cloud/install/install.sh | bash");
Ok(())
}
}
Loading