From f48108109e84ea6d869c75e98143be9b7ed5d069 Mon Sep 17 00:00:00 2001 From: orhun Date: Wed, 30 Jun 2021 02:22:06 +0300 Subject: [PATCH] chore(release): indicate which versions are managed by the script --- git-cliff-core/Cargo.toml | 2 +- git-cliff/Cargo.toml | 7 +++++-- release.sh | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/git-cliff-core/Cargo.toml b/git-cliff-core/Cargo.toml index 97bbc9df8f..672c680a18 100644 --- a/git-cliff-core/Cargo.toml +++ b/git-cliff-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "git-cliff-core" -version = "0.1.0-rc.16" +version = "0.1.0-rc.16" # managed by release.sh description = "Core library of git-cliff" authors = ["git-cliff contributors "] license = "GPL-3.0" diff --git a/git-cliff/Cargo.toml b/git-cliff/Cargo.toml index af448bcdc1..f8ef1bd947 100644 --- a/git-cliff/Cargo.toml +++ b/git-cliff/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "git-cliff" -version = "0.1.0-rc.16" +version = "0.1.0-rc.16" # managed by release.sh description = "A highly customizable changelog generator ⛰️" authors = ["git-cliff contributors "] license = "GPL-3.0" @@ -13,10 +13,13 @@ default-run = "git-cliff" edition = "2018" [dependencies] -git-cliff-core = { path = "../git-cliff-core" } pretty_env_logger = "0.4.0" log = "0.4.14" +[dependencies.git-cliff-core] +version = "0.1.0-rc.16" # managed by release.sh +path = "../git-cliff-core" + [dependencies.structopt] version = "0.3" default-features = false diff --git a/release.sh b/release.sh index 1ed5b0a8f4..a41126a4e1 100755 --- a/release.sh +++ b/release.sh @@ -3,7 +3,8 @@ # takes the tag as an argument (e.g. v0.1.0) if [ -n "$1" ]; then # update the version - sed "0,/^version = .*$/s//version = \"${1#v}\"/" -i git-cliff*/Cargo.toml + msg="# managed by release.sh" + sed "s/^version = .* $msg$/version = \"${1#v}\" $msg/" -i git-cliff*/Cargo.toml # update the changelog cargo run -- --tag "$1" > CHANGELOG.md git add -A && git commit -m "chore(release): prepare for $1"