feat(mise): add support for parallel job configuration in mise (#1548)
Co-authored-by: Gideon <87426140+GideonBear@users.noreply.github.com>
This commit is contained in:
@@ -296,6 +296,10 @@
|
|||||||
# (default: false)
|
# (default: false)
|
||||||
# bump = false
|
# bump = false
|
||||||
|
|
||||||
|
# Number of jobs to run in parallel
|
||||||
|
# (default: 4)
|
||||||
|
# jobs = 4
|
||||||
|
|
||||||
# Run interactively
|
# Run interactively
|
||||||
# (default: false)
|
# (default: false)
|
||||||
# interactive = false
|
# interactive = false
|
||||||
|
|||||||
@@ -179,6 +179,7 @@ pub struct Chezmoi {
|
|||||||
pub struct Mise {
|
pub struct Mise {
|
||||||
bump: Option<bool>,
|
bump: Option<bool>,
|
||||||
interactive: Option<bool>,
|
interactive: Option<bool>,
|
||||||
|
jobs: Option<u32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Default, Debug, Merge)]
|
#[derive(Deserialize, Default, Debug, Merge)]
|
||||||
@@ -1823,6 +1824,10 @@ impl Config {
|
|||||||
.unwrap_or(false)
|
.unwrap_or(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn mise_jobs(&self) -> u32 {
|
||||||
|
self.config_file.mise.as_ref().and_then(|mise| mise.jobs).unwrap_or(4)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn mise_interactive(&self) -> bool {
|
pub fn mise_interactive(&self) -> bool {
|
||||||
self.config_file
|
self.config_file
|
||||||
.mise
|
.mise
|
||||||
|
|||||||
@@ -871,6 +871,10 @@ pub fn run_mise(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
cmd.arg("--bump");
|
cmd.arg("--bump");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ctx.config().mise_jobs() != 4 {
|
||||||
|
cmd.args(["--jobs", &ctx.config().mise_jobs().to_string()]);
|
||||||
|
}
|
||||||
|
|
||||||
cmd.status_checked()
|
cmd.status_checked()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user