From f45ceb23206b4aaeca123c06bd3d59770f728468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 11 Jan 2024 22:17:03 +0100 Subject: chore(publish): add --dry-run flag (#21895) --- cli/args/flags.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cli/args/flags.rs') 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, + 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"), }); } -- cgit v1.2.3