Skip to content

Commit d3fa9f8

Browse files
committed
component push: add --changelog
1 parent be08d94 commit d3fa9f8

File tree

1 file changed

+15
-5
lines changed
  • crates/cli/src/commands/components

1 file changed

+15
-5
lines changed

Diff for: crates/cli/src/commands/components/push.rs

+15-5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ pub struct Options {
1212
///
1313
/// Defaults to the user "self" org
1414
pub organization: Option<String>,
15+
#[arg(long, conflicts_with = "private")]
16+
pub public: bool,
17+
18+
#[arg(long, conflicts_with = "public")]
19+
pub private: bool,
20+
21+
pub changelog: Option<String>,
1522
}
1623

1724
pub async fn run(opts: Options) -> anyhow::Result<()> {
@@ -183,11 +190,14 @@ pub async fn run(opts: Options) -> anyhow::Result<()> {
183190
);
184191
}
185192

186-
let changelog = Editor::new("Describe the new version changelog (optional)")
187-
.with_help_message(
188-
"Type (e) to open the default editor. Use the EDITOR env variable to change it.",
189-
)
190-
.prompt_skippable()?;
193+
let changelog = match opts.changelog {
194+
Some(changelog) => Some(changelog),
195+
None => Editor::new("Describe the new version changelog (optional)")
196+
.with_help_message(
197+
"Type (e) to open the default editor. Use the EDITOR env variable to change it.",
198+
)
199+
.prompt_skippable()?,
200+
};
191201

192202
let confirm = Confirm::new(&format!(
193203
"Ready to push {}. Confirm?",

0 commit comments

Comments
 (0)