Skip to main content

semver_common/tools/git/
tag.rs

1use crate::{Alert, run_command};
2use r_log::Logger;
3
4/// Creates a new git tag with a supplied name and message.
5pub fn tag(name: &str, message: &str, logger: &Logger) -> Result<(), Alert> {
6    run_command(
7        "git",
8        ["tag", "-a", name, "-m", &format!("{} {}", message, name)],
9        Some(logger),
10    )?;
11    Ok(())
12}