Skip to content

Commit

Permalink
feat(cli/components): check version asap on push (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
KokaKiwi authored Feb 17, 2025
1 parent 698df85 commit ea02375
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions crates/cli/src/commands/components/push.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@ pub async fn run(opts: Options) -> anyhow::Result<()> {
Err(err) => anyhow::bail!("Error contacting API: {}", err.into_message()),
};

// Check if version already exists
if component.versions.contains_key(&manifest.component.version) {
anyhow::bail!(
"The version {} for {}/{} already exists in the registry. Did you forget to update the manifest?",
manifest.component.version,
organization.slug, component_slug,
);
}

let changelog =
Editor::new("Please describe the changes from the previous version").prompt_skippable()?;

Expand Down

0 comments on commit ea02375

Please sign in to comment.