diff --git a/CHANGELOG.md b/CHANGELOG.md index 1516d7c..f2d7134 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## 0.5.2 + +Detect tags better. + ## 0.5.1 Initialize `pretty_env_logger` on app boot. Oops. diff --git a/Cargo.lock b/Cargo.lock index 6d4974b..7598d7c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -348,7 +348,7 @@ dependencies = [ [[package]] name = "gitea-release" -version = "0.5.1" +version = "0.5.2" dependencies = [ "anyhow", "comrak", diff --git a/Cargo.toml b/Cargo.toml index 7aae7bd..4fed248 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gitea-release" -version = "0.5.1" +version = "0.5.2" authors = ["Christine Dodrill "] edition = "2018" diff --git a/VERSION b/VERSION index 4b9fcbe..cb0c939 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.1 +0.5.2 diff --git a/src/cmd/cut.rs b/src/cmd/cut.rs index 636857d..98e161e 100644 --- a/src/cmd/cut.rs +++ b/src/cmd/cut.rs @@ -10,15 +10,17 @@ pub async fn run( ) -> Result<()> { let repo = git2::Repository::open(".")?; let tag = tag.unwrap_or(version::read_version("VERSION".into())?); + let vtag = format!("v{}", tag); - if git::has_tag(&repo, tag.clone())? { + if git::has_tag(&repo, vtag.clone())? { return Err(anyhow::anyhow!("what")); } let desc = changelog::read(fname, tag.clone())?; let cli = gitea::Client::new(common.server, common.token, crate::APP_USER_AGENT)?; - let vtag = format!("v{}", tag); - let repo = cli.get_repo(common.owner.clone(), common.repo.clone()).await?; + let repo = cli + .get_repo(common.owner.clone(), common.repo.clone()) + .await?; let cr = gitea::CreateRelease { body: desc,