diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-12-11 12:43:04 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-12-11 12:43:17 +0100 |
commit | f204f854980a17d0fc89b6d1a2753bb19dcab478 (patch) | |
tree | dcf806aff7b26584071e98d2c75c16d361274ff1 | |
parent | ce6f9d77c80849d11b442cf4c6783ec972456521 (diff) |
Rename for consistency: deny_images -> denied_images
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r-- | src/cli.rs | 6 | ||||
-rw-r--r-- | src/commands/build.rs | 4 | ||||
-rw-r--r-- | src/commands/dependencies_of.rs | 2 | ||||
-rw-r--r-- | src/commands/find_pkg.rs | 2 | ||||
-rw-r--r-- | src/commands/what_depends.rs | 2 | ||||
-rw-r--r-- | src/config/util.rs | 4 | ||||
-rw-r--r-- | src/package/package.rs | 4 | ||||
-rw-r--r-- | src/ui.rs | 6 |
8 files changed, 15 insertions, 15 deletions
@@ -406,7 +406,7 @@ pub fn cli<'a>() -> App<'a> { .multiple(false) .long("all") .short('A') - .about("Same as: -SDpEFPs --deny-images --allowed-images (all flags enabled)") + .about("Same as: -SDpEFPs --denied-images --allowed-images (all flags enabled)") ) .arg(Arg::new("show_sources") @@ -474,10 +474,10 @@ pub fn cli<'a>() -> App<'a> { .about("Show the images on which the package is only allowed to be built") ) - .arg(Arg::new("show_deny_images") + .arg(Arg::new("show_denied_images") .required(false) .multiple(false) - .long("deny-images") + .long("denied-images") .about("Show the images on which the package is not allowed to be built") ) diff --git a/src/commands/build.rs b/src/commands/build.rs index a46166d..5aae1bb 100644 --- a/src/commands/build.rs +++ b/src/commands/build.rs @@ -218,8 +218,8 @@ pub async fn build(repo_root: &Path, } } - if let Some(denylist) = pkg.deny_on_images() { - if denylist.iter().any(|denied| image_name == *denied) { + if let Some(deniedlist) = pkg.denied_images() { + if deniedlist.iter().any(|denied| image_name == *denied) { return Err(anyhow!("Package {} {} is not allowed to be built on {}", pkg.name(), pkg.version(), image_name)) } } diff --git a/src/commands/dependencies_of.rs b/src/commands/dependencies_of.rs index 9bb2d85..c243c46 100644 --- a/src/commands/dependencies_of.rs +++ b/src/commands/dependencies_of.rs @@ -40,7 +40,7 @@ pub async fn dependencies_of(matches: &ArgMatches, config: &Configuration, repo: print_env: false, print_flags: false, print_allowed_images: false, - print_deny_images: false, + print_denied_images: false, print_phases: false, print_script: false, script_line_numbers: false, diff --git a/src/commands/find_pkg.rs b/src/commands/find_pkg.rs index da46aa4..a2bdf3e 100644 --- a/src/commands/find_pkg.rs +++ b/src/commands/find_pkg.rs @@ -54,7 +54,7 @@ pub async fn find_pkg(matches: &ArgMatches, config: &Configuration, repo: Reposi print_env : matches.is_present("show_env"), print_flags : matches.is_present("show_flags"), print_allowed_images: matches.is_present("show_allowed_images"), - print_deny_images : matches.is_present("show_deny_images"), + print_denied_images : matches.is_present("show_denied_images"), print_phases : matches.is_present("show_phases"), print_script : matches.is_present("show_script"), script_line_numbers : !matches.is_present("no_script_line_numbers"), diff --git a/src/commands/what_depends.rs b/src/commands/what_depends.rs index 7db9097..1c63fcf 100644 --- a/src/commands/what_depends.rs +++ b/src/commands/what_depends.rs @@ -45,7 +45,7 @@ pub async fn what_depends(matches: &ArgMatches, config: &Configuration, repo: Re print_env: false, print_flags: false, print_allowed_images: false, - print_deny_images: false, + print_denied_images: false, print_phases: false, print_script: false, script_line_numbers: false, diff --git a/src/config/util.rs b/src/config/util.rs index 9255c34..fddc292 100644 --- a/src/config/util.rs +++ b/src/config/util.rs @@ -51,9 +51,9 @@ pub fn default_package_print_format() -> String { {{#each p.allowed_images}}{{this}} {{/each~}} {{/if~}} - {{~#if print_deny_images}} + {{~#if print_denied_images}} Denied on: - {{#each p.deny_on_images}}{{this}} + {{#each p.denied_images}}{{this}} {{/each~}} {{/if~}} {{~#if print_phases}} diff --git a/src/package/package.rs b/src/package/package.rs index 7db3795..787848e 100644 --- a/src/package/package.rs +++ b/src/package/package.rs @@ -50,7 +50,7 @@ pub struct Package { #[getset(get = "pub")] #[serde(skip_serializing_if = "Option::is_none")] - deny_on_images: Option<Vec<ImageName>>, + denied_images: Option<Vec<ImageName>>, #[getset(get = "pub")] phases: HashMap<PhaseName, Phase>, @@ -70,7 +70,7 @@ impl Package { environment: None, flags: None, allowed_images: None, - deny_on_images: None, + denied_images: None, phases: HashMap::new(), } } @@ -37,7 +37,7 @@ pub struct PackagePrintFlags { pub print_env: bool, pub print_flags: bool, pub print_allowed_images: bool, - pub print_deny_images: bool, + pub print_denied_images: bool, pub print_phases: bool, pub print_script: bool, pub script_line_numbers: bool, @@ -58,7 +58,7 @@ impl PackagePrintFlags { || self.print_env || self.print_flags || self.print_allowed_images - || self.print_deny_images + || self.print_denied_images || self.print_phases || self.print_script } @@ -117,7 +117,7 @@ fn print_package(out: &mut dyn Write, data.insert("print_env" , serde_json::Value::Bool(flags.print_all || flags.print_env)); data.insert("print_flags" , serde_json::Value::Bool(flags.print_all || flags.print_flags)); data.insert("print_allowed_images", serde_json::Value::Bool(flags.print_all || flags.print_allowed_images)); - data.insert("print_deny_images" , serde_json::Value::Bool(flags.print_all || flags.print_deny_images)); + data.insert("print_denied_images" , serde_json::Value::Bool(flags.print_all || flags.print_denied_images)); data.insert("print_phases" , serde_json::Value::Bool(flags.print_all || flags.print_phases)); data.insert("print_script" , serde_json::Value::Bool(flags.print_all || flags.print_script)); |