Skip to content

Commit ab83788

Browse files
committed
ci: move pre-release hook to script file
This is so that it can access the $NEW_VERSION env variable.
1 parent 6c8b760 commit ab83788

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

release.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
allow-branch = ["main"]
2-
pre-release-hook = ["git", "cliff", "-o", "./CHANGELOG.md", "-t", "$NEW_VERSION"]
2+
pre-release-hook = ["./scripts/pre-release-hook.sh"]

scripts/pre-release-hook.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
3+
if [[ -z "$NEW_VERSION" ]]; then
4+
echo "NEW_VERSION environment variable is not set!"
5+
exit 1
6+
fi
7+
8+
git cliff -o CHANGELOG.md -t "$NEW_VERSION"

0 commit comments

Comments
 (0)