diff --git a/scripts/release-plz.sh b/scripts/release-plz.sh index 6576455..609e05a 100755 --- a/scripts/release-plz.sh +++ b/scripts/release-plz.sh @@ -22,17 +22,18 @@ if [ "${DRY_RUN:-1}" == 1 ]; then exit 0 fi +# Check if there are any unreleased changes +if [ -z "$changelog" ] || [ "$changelog" = "" ]; then + echo "No unreleased changes found" + exit 0 +fi + # Configure git for automated commits git config user.name mise-en-dev git config user.email 123107610+mise-en-dev@users.noreply.github.com -# Update package.json version if it's different -if [ "$cur_version" != "${version#v}" ]; then - npm version "${version#v}" --no-git-tag-version -else - echo "Version $cur_version is already current, no changes to release" - exit 0 -fi +# Update package.json version +npm version "${version#v}" --no-git-tag-version git add package.json package-lock.json git status