-
Notifications
You must be signed in to change notification settings - Fork 0
ODP-5569: Enable creating releases even if the 'previous' tag does not exist #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
ccdc320
dd1a492
a247e86
5de02ef
d01db24
40612ce
60ef30e
b141db7
6910bfd
f665def
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -583,8 +583,8 @@ pub struct CreateReleaseCommand { | |||||
| #[arg(short, long)] | ||||||
| pub current_release: String, | ||||||
| /// The previous release tag. This is used to generate the changelog | ||||||
| #[arg(short, long)] | ||||||
| pub previous_release: String, | ||||||
| #[arg(short, long, required_unless_present = "skip_missing_tag")] | ||||||
|
||||||
| #[arg(short, long, required_unless_present = "skip_missing_tag")] | |
| #[arg(short, long, required = true)] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -326,7 +326,7 @@ async fn match_branch_cmds( | |
| } else if let Some(repository) = &repository { | ||
| client | ||
| .modify_branch( | ||
| repository.to_string(), | ||
| repository.clone(), | ||
| branch, | ||
| old_text, | ||
| new_text, | ||
|
|
@@ -372,7 +372,7 @@ async fn match_repo_cmds( | |
| if let Some(parent) = fork_workaround.get(repository) { | ||
| client.sync_with_upstream(repository, parent).await?; | ||
| } else if forks_with_workaround.contains_key(repository) { | ||
| return Err(GitError::NoUpstreamRepo(repository.to_string())); | ||
| return Err(GitError::NoUpstreamRepo(repository.clone())); | ||
| } else if recursive { | ||
| client.sync_fork_recursive(repository).await?; | ||
| } else { | ||
|
|
@@ -420,7 +420,7 @@ async fn match_repo_cmds( | |
|
|
||
| let branches: Vec<Vec<String>> = branches | ||
| .iter() | ||
| .map(|(b, d)| vec![b.to_string(), d.to_string()]) | ||
| .map(|(b, d)| vec![b.clone(), d.clone()]) | ||
| .collect(); | ||
| client.display_check_results( | ||
| vec!["Branch".to_string(), "Date".to_string()], | ||
|
|
@@ -452,7 +452,7 @@ async fn match_repo_cmds( | |
| } = &result.clone(); | ||
| let branches = branches | ||
| .iter() | ||
| .map(|(b, d)| vec![b.to_string(), d.to_string()]) | ||
| .map(|(b, d)| vec![b.clone(), d.clone()]) | ||
| .collect(); | ||
| if !client.is_tty { | ||
| println!("Repository,Branch,Date,License,Rules"); | ||
|
|
@@ -549,22 +549,26 @@ async fn match_release_cmds( | |
| match cmd { | ||
| ReleaseCommand::Create(create_cmd) => { | ||
| let repository = create_cmd.repository.as_ref(); | ||
| let skip_missing_previous_tag = create_cmd.skip_missing_tag; | ||
| let previous_release = create_cmd.previous_release.clone().unwrap_or_default(); | ||
|
||
| if create_cmd.all { | ||
| client | ||
| .create_all_releases( | ||
| &create_cmd.current_release, | ||
| &create_cmd.previous_release, | ||
| &previous_release, | ||
| create_cmd.release_name.as_deref(), | ||
| repos, | ||
| skip_missing_previous_tag, | ||
| ) | ||
| .await?; | ||
| } else if let Some(repository) = repository { | ||
| client | ||
| .create_release( | ||
| repository, | ||
| &create_cmd.current_release, | ||
| &create_cmd.previous_release, | ||
| &previous_release, | ||
| create_cmd.release_name.as_deref(), | ||
| skip_missing_previous_tag, | ||
| ) | ||
| .await?; | ||
| } | ||
|
|
@@ -623,9 +627,7 @@ async fn match_backup_cmds( | |
| return Ok(()); | ||
| } | ||
| } else if let Some(repository) = repository { | ||
| let repo_dist = client | ||
| .backup_repo(repository.to_string(), path, atomic) | ||
| .await?; | ||
| let repo_dist = client.backup_repo(repository.clone(), path, atomic).await?; | ||
| if dest == BackupDestination::S3 { | ||
| if let Some(bucket) = bucket { | ||
| client.backup_to_s3(&repo_dist, bucket).await?; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.