summaryrefslogtreecommitdiff
path: root/cli/args/flags.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2024-01-11 22:17:03 +0100
committerGitHub <noreply@github.com>2024-01-11 21:17:03 +0000
commitf45ceb23206b4aaeca123c06bd3d59770f728468 (patch)
treedb2628da9140b8a0a07c3ac299d4dbb9678fc93c /cli/args/flags.rs
parent9268df5f3405103214b4e39d82e5ab1b465475a0 (diff)
chore(publish): add --dry-run flag (#21895)
Diffstat (limited to 'cli/args/flags.rs')
-rw-r--r--cli/args/flags.rs8
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"),
});
}