diff --git a/CHANGELOG.md b/CHANGELOG.md index 3109edb..602dd3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ Unreleased ========== - Fix merging of `extra_options` configuration in `build` section +- Fix merging priority of `build` section options 0.5.1 (2023-04-16) ================== diff --git a/src/config.rs b/src/config.rs index d20b973..e8026dd 100644 --- a/src/config.rs +++ b/src/config.rs @@ -32,7 +32,7 @@ pub struct BuildConfiguration { pub build_mode: Option, #[serde(default)] pub out_name: Option, - #[merge(strategy = merge::vec::append)] + #[merge(strategy = merge::vec::prepend)] #[serde(default)] pub extra_options: Vec, #[serde(default)] diff --git a/src/run.rs b/src/run.rs index 5e0a8d6..dd07c07 100644 --- a/src/run.rs +++ b/src/run.rs @@ -46,15 +46,15 @@ pub fn run() -> Result<(), anyhow::Error> { ModeConfiguration::Copy { destination, branch, - build, + mut build, include_files, prune, } => { - config.build.merge(build); - run_build(&root, &config.build)?; + build.merge(config.build); + run_build(&root, &build)?; run_copy( &root, - &config.build.path, + &build.path, &destination, &branch, &include_files, @@ -64,7 +64,7 @@ pub fn run() -> Result<(), anyhow::Error> { ModeConfiguration::Upload { authentication, branch, - build, + mut build, include_files, hostname, ssl, @@ -83,11 +83,11 @@ pub fn run() -> Result<(), anyhow::Error> { } ); - config.build.merge(build); - run_build(&root, &config.build)?; + build.merge(config.build); + run_build(&root, &build)?; run_upload( &root, - &config.build.path, + &build.path, &authentication, &branch, &include_files,