Update tools/publish.sh

This commit is contained in:
Taiki Endo
2022-01-01 17:57:13 +09:00
parent 996e798ea2
commit fc57aaa8ad

View File

@@ -37,6 +37,10 @@ echo "============== CHANGELOG =============="
parse-changelog CHANGELOG.md "${version}"
echo "======================================="
if ! grep <CHANGELOG.md -E "^\\[${version//./\\.}\\]: " >/dev/null; then
bail "not found link to [${version}] in CHANGELOG.md"
fi
# Make sure the same release has not been created in the past.
if gh release view "${tag}" &>/dev/null; then
bail "tag '${tag}' has already been created and pushed"