Skip to content

Commit

Permalink
fix: fixed release.sh to also work on macos and use gnu sed
Browse files Browse the repository at this point in the history
  • Loading branch information
gh0st42 committed Nov 24, 2023
1 parent 944fdbb commit b39118c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@
if [ -n "$1" ]; then
# update the version
msg="# managed by release.sh"
sed "s/^version = .* $msg$/version = \"${1#v}\" $msg/" -i Cargo.toml

# on macos use gsed instead of set
if [ "$(uname)" == "Darwin" ]; then
sed="gsed"
else
sed="sed"
fi
$sed "s/^version = .* $msg$/version = \"${1#v}\" $msg/" -i Cargo.toml

# update the changelog
git cliff --tag "$1" > CHANGELOG.md
git add -A && git commit -m "chore(release): prepare for $1"
Expand Down

0 comments on commit b39118c

Please sign in to comment.