Add aqua tool installer cli (#889)
* Add aqua cli * Move aqua cli to generic.rs * Add a dry-run support to aqua * style: format code --------- Co-authored-by: Steve Lau <stevelauc@outlook.com>
This commit is contained in:
@@ -53,6 +53,7 @@ pub enum Step {
|
|||||||
AppMan,
|
AppMan,
|
||||||
Asdf,
|
Asdf,
|
||||||
Atom,
|
Atom,
|
||||||
|
Aqua,
|
||||||
Audit,
|
Audit,
|
||||||
AutoCpufreq,
|
AutoCpufreq,
|
||||||
Bin,
|
Bin,
|
||||||
|
|||||||
@@ -420,6 +420,7 @@ fn run() -> Result<()> {
|
|||||||
})?;
|
})?;
|
||||||
runner.execute(Step::Poetry, "Poetry", || generic::run_poetry(&ctx))?;
|
runner.execute(Step::Poetry, "Poetry", || generic::run_poetry(&ctx))?;
|
||||||
runner.execute(Step::Zvm, "ZVM", || generic::run_zvm(&ctx))?;
|
runner.execute(Step::Zvm, "ZVM", || generic::run_zvm(&ctx))?;
|
||||||
|
runner.execute(Step::Aqua, "aqua", || generic::run_aqua(&ctx))?;
|
||||||
|
|
||||||
if should_run_powershell {
|
if should_run_powershell {
|
||||||
runner.execute(Step::Powershell, "Powershell Modules Update", || {
|
runner.execute(Step::Powershell, "Powershell Modules Update", || {
|
||||||
|
|||||||
@@ -224,6 +224,20 @@ pub fn run_apm(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
.status_checked()
|
.status_checked()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn run_aqua(ctx: &ExecutionContext) -> Result<()> {
|
||||||
|
let aqua = require("aqua")?;
|
||||||
|
|
||||||
|
print_separator("Aqua");
|
||||||
|
if ctx.run_type().dry() {
|
||||||
|
println!("Updating aqua ...");
|
||||||
|
println!("Updating aqua installed cli tools ...");
|
||||||
|
Ok(())
|
||||||
|
} else {
|
||||||
|
ctx.run_type().execute(&aqua).arg("update-aqua").status_checked()?;
|
||||||
|
ctx.run_type().execute(&aqua).arg("update").status_checked()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn run_rustup(ctx: &ExecutionContext) -> Result<()> {
|
pub fn run_rustup(ctx: &ExecutionContext) -> Result<()> {
|
||||||
let rustup = require("rustup")?;
|
let rustup = require("rustup")?;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user