Skip to content

Commit

Permalink
fix(plugins/npm-post): don't trigger hook on commit or push
Browse files Browse the repository at this point in the history
  • Loading branch information
dalisoft committed Jun 16, 2024
1 parent 5b1adc7 commit 727d34b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions plugins/npm-post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,24 +97,24 @@ release() {
fi

if [ -z "${GPG_NO_SIGN-}" ] && [ -n "${GPG_KEY-}" ] && [ -n "${GPG_KEY_ID-}" ]; then
git commit --sign -m "chore(${PKG_NAME}): update \`package.json\` version to ${NEXT_RELEASE_VERSION-}"
git commit --sign -m "chore(${PKG_NAME}): update \`package.json\` version to ${NEXT_RELEASE_VERSION-}" --no-verify
elif [ -z "${SSH_NO_SIGN-}" ] && [ -n "${SSH_PUB_KEY-}" ]; then
git commit --sign -m "chore(${PKG_NAME}): update \`package.json\` version to ${NEXT_RELEASE_VERSION}"
git commit --sign -m "chore(${PKG_NAME}): update \`package.json\` version to ${NEXT_RELEASE_VERSION}" --no-verify
else
git commit --no-gpg-sign -m "chore(${PKG_NAME}): update \`package.json\` version to ${NEXT_RELEASE_VERSION}"
git commit --no-gpg-sign -m "chore(${PKG_NAME}): update \`package.json\` version to ${NEXT_RELEASE_VERSION}" --no-verify
fi
else
if [ -z "${GPG_NO_SIGN-}" ] && [ -n "${GPG_KEY-}" ] && [ -n "${GPG_KEY_ID-}" ]; then
git commit --sign -m "chore: update \`package.json\` version to ${NEXT_RELEASE_VERSION}"
git commit --sign -m "chore: update \`package.json\` version to ${NEXT_RELEASE_VERSION}" --no-verify
elif [ -z "${SSH_NO_SIGN-}" ] && [ -n "${SSH_PUB_KEY-}" ]; then
git commit --sign -m "chore: update \`package.json\` version to ${NEXT_RELEASE_VERSION}"
git commit --sign -m "chore: update \`package.json\` version to ${NEXT_RELEASE_VERSION}" --no-verify
else
git commit --no-gpg-sign -m "chore: update \`package.json\` version to ${NEXT_RELEASE_VERSION}"
git commit --no-gpg-sign -m "chore: update \`package.json\` version to ${NEXT_RELEASE_VERSION}" --no-verify
fi
fi

if [ -n "${GIT_REMOTE_ORIGIN}" ]; then
git push
git push --no-verify
CHECKOUT_SHA=$(git rev-parse HEAD)
log "Committed npm [${NEXT_RELEASE_TAG-}] tag"
else
Expand Down

0 comments on commit 727d34b

Please sign in to comment.