Skip to content

Commit

Permalink
chore(release): indicate which versions are managed by the script
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Jun 29, 2021
1 parent 99f2f07 commit f481081
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion git-cliff-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
license = "GPL-3.0"
Expand Down
7 changes: 5 additions & 2 deletions git-cliff/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
license = "GPL-3.0"
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f481081

Please sign in to comment.