From 4b495629c8e0b690b6f8edcd14152e82727f5ec3 Mon Sep 17 00:00:00 2001 From: Andrei Pavel Date: Wed, 20 Nov 2019 13:35:41 +0200 Subject: [PATCH] =?UTF-8?q?[=F0=9F=93=A6=20NEW]=20flutter=20upgrade=20(#26?= =?UTF-8?q?0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.rs | 1 + src/main.rs | 9 +++++++++ src/steps/generic.rs | 7 +++++++ 3 files changed, 17 insertions(+) diff --git a/src/config.rs b/src/config.rs index 7af0a8fe..f59e88f7 100644 --- a/src/config.rs +++ b/src/config.rs @@ -33,6 +33,7 @@ pub enum Step { Remotes, Rustup, Cargo, + Flutter, Shell, Opam, Vcpkg, diff --git a/src/main.rs b/src/main.rs index 91e4b7cf..b008b926 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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())?; } diff --git a/src/steps/generic.rs b/src/steps/generic.rs index 3efce51a..2abb827d 100644 --- a/src/steps/generic.rs +++ b/src/steps/generic.rs @@ -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()?;