[📦 NEW] flutter upgrade (#260)

This commit is contained in:
Andrei Pavel
2019-11-20 13:35:41 +02:00
committed by Roey Darwish Dror
parent cda1363b6d
commit 4b495629c8
3 changed files with 17 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ pub enum Step {
Remotes,
Rustup,
Cargo,
Flutter,
Shell,
Opam,
Vcpkg,

View File

@@ -346,6 +346,15 @@ fn run() -> Result<(), Error> {
)?;
}
if config.should_run(Step::Flutter) {
execute(
&mut report,
"Flutter",
|| generic::run_flutter_upgrade(run_type),
config.no_retry(),
)?;
}
if config.should_run(Step::Emacs) {
execute(&mut report, "Emacs", || emacs.upgrade(run_type), config.no_retry())?;
}

View File

@@ -18,6 +18,13 @@ pub fn run_cargo_update(run_type: RunType) -> Result<(), Error> {
.check_run()
}
pub fn run_flutter_upgrade(run_type: RunType) -> Result<(), Error> {
let flutter = utils::require("flutter")?;
print_separator("Flutter");
run_type.execute(&flutter).arg("upgrade").check_run()
}
pub fn run_gem(base_dirs: &BaseDirs, run_type: RunType) -> Result<(), Error> {
let gem = utils::require("gem")?;
base_dirs.home_dir().join(".gem").require()?;