Add option to disable node package updates (#213)
This commit is contained in:
committed by
Roey Darwish Dror
parent
bfbb486fba
commit
7bdd00f88a
@@ -28,6 +28,7 @@ lazy_static! {
|
||||
m.insert("vim", Step::Vim);
|
||||
m.insert("emacs", Step::Emacs);
|
||||
m.insert("gem", Step::Gem);
|
||||
m.insert("node", Step::Node);
|
||||
m.insert("sdkman", Step::Sdkman);
|
||||
m.insert("remotes", Step::Remotes);
|
||||
m.insert("rustup", Step::Rustup);
|
||||
@@ -53,6 +54,8 @@ pub enum Step {
|
||||
Emacs,
|
||||
/// Don't upgrade ruby gems
|
||||
Gem,
|
||||
/// Don't upgrade npm/composer/yarn packages
|
||||
Node,
|
||||
/// Don't upgrade SDKMAN! and its packages
|
||||
Sdkman,
|
||||
/// Don't run remote Togprades
|
||||
|
||||
38
src/main.rs
38
src/main.rs
@@ -351,24 +351,26 @@ fn run() -> Result<(), Error> {
|
||||
)?;
|
||||
}
|
||||
|
||||
execute(
|
||||
&mut report,
|
||||
"NPM",
|
||||
|| node::run_npm_upgrade(&base_dirs, run_type),
|
||||
config.no_retry(),
|
||||
)?;
|
||||
execute(
|
||||
&mut report,
|
||||
"composer",
|
||||
|| generic::run_composer_update(&base_dirs, run_type),
|
||||
config.no_retry(),
|
||||
)?;
|
||||
execute(
|
||||
&mut report,
|
||||
"yarn",
|
||||
|| node::yarn_global_update(run_type),
|
||||
config.no_retry(),
|
||||
)?;
|
||||
if config.should_run(Step::Node) {
|
||||
execute(
|
||||
&mut report,
|
||||
"NPM",
|
||||
|| node::run_npm_upgrade(&base_dirs, run_type),
|
||||
config.no_retry(),
|
||||
)?;
|
||||
execute(
|
||||
&mut report,
|
||||
"composer",
|
||||
|| generic::run_composer_update(&base_dirs, run_type),
|
||||
config.no_retry(),
|
||||
)?;
|
||||
execute(
|
||||
&mut report,
|
||||
"yarn",
|
||||
|| node::yarn_global_update(run_type),
|
||||
config.no_retry(),
|
||||
)?;
|
||||
}
|
||||
|
||||
#[cfg(not(any(
|
||||
target_os = "freebsd",
|
||||
|
||||
Reference in New Issue
Block a user