Skip to content

Commit

Permalink
fix(plugins/npm-post): update signing logic
Browse files Browse the repository at this point in the history
  • Loading branch information
dalisoft committed Apr 25, 2024
1 parent 429fff8 commit c1d567a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions plugins/npm-post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,17 @@ release() {
git add package.json

if $IS_WORKSPACE; then
git commit -m "Bump project ${PKG_NAME} version to ${NEXT_RELEASE_VERSION}"
if [ -z "${GPG_NO_SIGN-}" ] && [ -n "${GPG_KEY_ID-}" ] && [ -n "${GPG_PASSPHRASE-}" ]; then
git commit --sign -m "Bump project ${PKG_NAME} version to ${NEXT_RELEASE_VERSION}"
else
git commit --no-gpg-sign -m "Bump project ${PKG_NAME} version to ${NEXT_RELEASE_VERSION}"
fi
else
git commit -m "Bump package.json version to ${NEXT_RELEASE_VERSION}"
if [ -z "${GPG_NO_SIGN-}" ] && [ -n "${GPG_KEY_ID-}" ] && [ -n "${GPG_PASSPHRASE-}" ]; then
git commit --sign -m "Bump package.json version to ${NEXT_RELEASE_VERSION}"
else
git commit --no-gpg-sign -m "Bump package.json version to ${NEXT_RELEASE_VERSION}"
fi
fi

if [ -n "$GIT_REMOTE_ORIGIN" ]; then
Expand Down

0 comments on commit c1d567a

Please sign in to comment.