Split brew cask to a seperated step
This commit is contained in:
@@ -159,7 +159,8 @@ fn run() -> Result<()> {
|
|||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
{
|
{
|
||||||
if config.should_run(Step::Brew) {
|
if config.should_run(Step::Brew) {
|
||||||
runner.execute("brew", || unix::run_homebrew(&ctx))?;
|
runner.execute("Brew", || unix::run_brew(&ctx))?;
|
||||||
|
runner.execute("Brew Cask", || unix::run_brew_cask(&ctx))?;
|
||||||
}
|
}
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,17 +30,24 @@ pub fn run_fisher(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
|
|||||||
run_type.execute(&fish).args(&["-c", "fisher"]).check_run()
|
run_type.execute(&fish).args(&["-c", "fisher"]).check_run()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn run_homebrew(ctx: &ExecutionContext) -> Result<()> {
|
pub fn run_brew(ctx: &ExecutionContext) -> Result<()> {
|
||||||
let brew = require("brew")?;
|
let brew = require("brew")?;
|
||||||
print_separator("Brew");
|
print_separator("Brew");
|
||||||
let run_type = ctx.run_type();
|
let run_type = ctx.run_type();
|
||||||
let config = ctx.config();
|
|
||||||
|
|
||||||
run_type.execute(&brew).arg("update").check_run()?;
|
run_type.execute(&brew).arg("update").check_run()?;
|
||||||
run_type
|
run_type
|
||||||
.execute(&brew)
|
.execute(&brew)
|
||||||
.args(&["upgrade", "--ignore-pinned"])
|
.args(&["upgrade", "--ignore-pinned"])
|
||||||
.check_run()?;
|
.check_run()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn run_brew_cask(ctx: &ExecutionContext) -> Result<()> {
|
||||||
|
let brew = require("brew")?;
|
||||||
|
print_separator("Brew Cask");
|
||||||
|
|
||||||
|
let config = ctx.config();
|
||||||
|
let run_type = ctx.run_type();
|
||||||
|
|
||||||
let cask_upgrade_exists = Command::new(&brew)
|
let cask_upgrade_exists = Command::new(&brew)
|
||||||
.args(&["--repository", "buo/cask-upgrade"])
|
.args(&["--repository", "buo/cask-upgrade"])
|
||||||
|
|||||||
Reference in New Issue
Block a user