rsmultigit 0.1.28

Manage multiple git repositories at once
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::path::Path;

use anyhow::Result;

use crate::subprocess_utils::check_call;

/// Release a new version of a rust project: `cargo release <level>` bumps the
/// version in Cargo.toml, commits, tags, pushes, and publishes to crates.io.
/// `level` is one of "patch", "minor", "major" (see `cli::ReleaseType::as_str`).
pub fn publish(project: &Path, level: &str) -> Result<bool> {
    check_call(
        project,
        "cargo",
        &["release", level, "--execute", "--no-confirm"],
    )?;
    Ok(true)
}