Skip to content

Commit

Permalink
chore: automatically bump minor version if month/year changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mise-en-dev committed Mar 23, 2024
1 parent 3c3dc5e commit 96ad08d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .mise/tasks/release-plz
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,16 @@ if ! echo "$released_versions" | grep -q "^$cur_version$"; then
exit 0
fi

cargo set-version --bump patch
year="$(date +%Y)"
month="$(date +%-m)"
if echo "$cur_version" | grep -e "^$year\.$month\."; then
echo cargo set-version --bump patch
elif echo "$cur_version" | grep -e "^$year\."; then
echo cargo set-version --bump minor
else
cargo set-version "$year.1.0"
fi

version="$(cargo pkgid mise | cut -d# -f2)"
git cliff --tag "v$version" -o CHANGELOG.md
changelog="$(git cliff --tag "v$version" --unreleased --strip all)"
Expand Down

0 comments on commit 96ad08d

Please sign in to comment.