diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-01-11 22:17:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-11 21:17:03 +0000 |
commit | f45ceb23206b4aaeca123c06bd3d59770f728468 (patch) | |
tree | db2628da9140b8a0a07c3ac299d4dbb9678fc93c /cli/args/flags.rs | |
parent | 9268df5f3405103214b4e39d82e5ab1b465475a0 (diff) |
chore(publish): add --dry-run flag (#21895)
Diffstat (limited to 'cli/args/flags.rs')
-rw-r--r-- | cli/args/flags.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 0e4e88764..738bf9948 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -328,6 +328,7 @@ pub struct VendorFlags { #[derive(Clone, Debug, Eq, PartialEq)] pub struct PublishFlags { pub token: Option<String>, + pub dry_run: bool, } #[derive(Clone, Debug, Eq, PartialEq)] @@ -2379,6 +2380,12 @@ fn publish_subcommand() -> Command { .long("token") .help("The API token to use when publishing. If unset, interactive authentication is be used") ) + .arg( + Arg::new("dry-run") + .long("dry-run") + .help("Prepare the package for publishing performing all checks and validations without uploading") + .action(ArgAction::SetTrue), + ) }) } @@ -3812,6 +3819,7 @@ fn vendor_parse(flags: &mut Flags, matches: &mut ArgMatches) { fn publish_parse(flags: &mut Flags, matches: &mut ArgMatches) { flags.subcommand = DenoSubcommand::Publish(PublishFlags { token: matches.remove_one("token"), + dry_run: matches.get_flag("dry-run"), }); } |