Support yadm (fix #464) (#470)

This commit is contained in:
Roey Darwish Dror
2020-07-11 08:00:35 +03:00
committed by GitHub
parent 25b6b97d38
commit e8851af90c
3 changed files with 10 additions and 0 deletions

View File

@@ -105,6 +105,7 @@ pub enum Step {
Pkg, Pkg,
Powershell, Powershell,
CustomCommands, CustomCommands,
Yadm,
} }
#[derive(Deserialize, Default, Debug)] #[derive(Deserialize, Default, Debug)]

View File

@@ -153,6 +153,7 @@ fn run() -> Result<()> {
})?; })?;
} }
runner.execute(Step::Yadm, "yadm", || unix::run_yadm(&ctx))?;
runner.execute(Step::Nix, "nix", || unix::run_nix(&ctx))?; runner.execute(Step::Nix, "nix", || unix::run_nix(&ctx))?;
runner.execute(Step::HomeManager, "home-manager", || unix::run_home_manager(run_type))?; runner.execute(Step::HomeManager, "home-manager", || unix::run_home_manager(run_type))?;
runner.execute(Step::Asdf, "asdf", || unix::run_asdf(run_type))?; runner.execute(Step::Asdf, "asdf", || unix::run_asdf(run_type))?;

View File

@@ -76,6 +76,14 @@ pub fn run_nix(ctx: &ExecutionContext) -> Result<()> {
run_type.execute(&nix_env).arg("--upgrade").check_run() run_type.execute(&nix_env).arg("--upgrade").check_run()
} }
pub fn run_yadm(ctx: &ExecutionContext) -> Result<()> {
let yadm = require("yadm")?;
print_separator("yadm");
ctx.run_type().execute(&yadm).arg("pull").check_run()
}
pub fn run_asdf(run_type: RunType) -> Result<()> { pub fn run_asdf(run_type: RunType) -> Result<()> {
let asdf = require("asdf")?; let asdf = require("asdf")?;