Skip to content

Commit

Permalink
feat: add support for mise (topgrade-rs#757)
Browse files Browse the repository at this point in the history
Add support for mise-en-place (or mise). Mise is a tool like asdf (already supported). https://mise.jdx.dev/
  • Loading branch information
riffingonsoftware authored and InnocentZero committed May 25, 2024
1 parent a527aa0 commit ad3ea15
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ pub enum Step {
Mas,
Maza,
Micro,
Mise,
Myrepos,
Nix,
Node,
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ fn run() -> Result<()> {
runner.execute(Step::Guix, "guix", || unix::run_guix(&ctx))?;
runner.execute(Step::HomeManager, "home-manager", || unix::run_home_manager(&ctx))?;
runner.execute(Step::Asdf, "asdf", || unix::run_asdf(&ctx))?;
runner.execute(Step::Mise, "mise", || unix::run_mise(&ctx))?;
runner.execute(Step::Pkgin, "pkgin", || unix::run_pkgin(&ctx))?;
runner.execute(Step::Bun, "bun", || unix::run_bun(&ctx))?;
runner.execute(Step::BunPackages, "bun-packages", || unix::run_bun_packages(&ctx))?;
Expand Down
13 changes: 13 additions & 0 deletions src/steps/os/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,19 @@ pub fn run_asdf(ctx: &ExecutionContext) -> Result<()> {
.status_checked()
}

pub fn run_mise(ctx: &ExecutionContext) -> Result<()> {
let mise = require("mise")?;

print_separator("mise");

ctx.run_type().execute(&mise).arg("upgrade").status_checked()?;

ctx.run_type()
.execute(&mise)
.args(["plugins", "update"])
.status_checked()
}

pub fn run_home_manager(ctx: &ExecutionContext) -> Result<()> {
let home_manager = require("home-manager")?;

Expand Down

0 comments on commit ad3ea15

Please sign in to comment.