Skip to content

Commit

Permalink
feat: remove git operations
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Jun 2, 2024
1 parent 65c0089 commit 889df93
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ impl Update {
pub fn run(self) -> Result<()> {
self.git_command.is_clean()?;

let next_tag = self.next_tag();
println!("Checkout new branch {next_tag}");
self.git_command.checkout_new_branch(&next_tag)?;

let packages = self.get_packages();

self.update_cargo_toml_version_for_workspace(&packages)?;
Expand All @@ -108,7 +104,6 @@ impl Update {
for package in &packages {
self.generate_changelog_for_package(package)?;
}
self.commit_and_tag_all()?;
Ok(())
}

Expand Down Expand Up @@ -136,10 +131,6 @@ impl Update {
version
}

fn next_tag(&self) -> String {
format!("{TAG_PREFIX}{}", self.next_version)
}

/// # Errors
pub fn regenerate_changelogs(&self) -> Result<()> {
for package in self.get_packages() {
Expand All @@ -164,14 +155,6 @@ impl Update {
Ok(())
}

fn commit_and_tag_all(&self) -> Result<()> {
let next_version = self.next_version.to_string();
let commit_message = format!("Release crates v{next_version}");
self.git_command.add_all_and_commit(&commit_message)?;
self.git_command.git(&["tag", &self.next_tag()])?;
Ok(())
}

fn generate_changelog_for_package(&self, package: &Package) -> Result<()> {
let package_path = package.manifest_path.as_std_path();
let package_path = package_path
Expand Down

0 comments on commit 889df93

Please sign in to comment.