diff --git a/plugins/PLUGIN_TEMPLATE.sh b/plugins/PLUGIN_TEMPLATE.sh index 8ccfb41..ad359f2 100644 --- a/plugins/PLUGIN_TEMPLATE.sh +++ b/plugins/PLUGIN_TEMPLATE.sh @@ -2,5 +2,5 @@ set -eu release() { - echo "Template for plug-in" + printf "%s" "Template for plug-in" } diff --git a/plugins/changelog.sh b/plugins/changelog.sh index a64a040..51d3b4f 100644 --- a/plugins/changelog.sh +++ b/plugins/changelog.sh @@ -12,7 +12,7 @@ release() { CONTENT="\n$(cat CHANGELOG.md)" fi rm -rf CHANGELOG.md - printf "%s%s" "$RELEASE_BODY" "$CONTENT" >>CHANGELOG.md + printf "%b%b" "$RELEASE_BODY" "$CONTENT" >>CHANGELOG.md log "Generated Changelog!" else log "Skipped Changelog creation in DRY-RUN mode..." diff --git a/plugins/github-release.sh b/plugins/github-release.sh index 8e956f3..c08879b 100644 --- a/plugins/github-release.sh +++ b/plugins/github-release.sh @@ -21,7 +21,7 @@ release() { "https://api.github.com/repos/$GIT_REPO_NAME/releases" \ -d "{\"tag_name\":\"$NEXT_RELEASE_TAG\",\"target_commitish\":\"$CHECKOUT_SHA\",\"name\":\"$NEXT_RELEASE_TAG\",\"body\":\"$RELEASE_BODY\",\"draft\":false,\"prerelease\":$PRE_RELEASE_VERSION,\"generate_release_notes\":false,\"make_latest\":\"true\"}" log "Created GitHub release [$NEXT_RELEASE_TAG]!" - echo "GitHub release available at https://github.com/$GIT_REPO_NAME/releases/tag/$NEXT_RELEASE_TAG" + log "GitHub release available at https://github.com/$GIT_REPO_NAME/releases/tag/$NEXT_RELEASE_TAG" else log "Skipped GitHub release [$NEXT_RELEASE_TAG] in DRY-RUN mode." fi diff --git a/plugins/npm.sh b/plugins/npm.sh index 26cf808..cdb9e60 100644 --- a/plugins/npm.sh +++ b/plugins/npm.sh @@ -9,7 +9,7 @@ release() { if ! $IS_DRY_RUN; then TEMP_FILE=$(mktemp) - echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >>"$TEMP_FILE" + printf "%s\n" "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >>"$TEMP_FILE" # Bump `package.json` `version` for properly publishing sed -i.bak "s/\"version\": \"[^\"]*\",/\"version\": \"$NEXT_BUILD_VERSION\",/" "package.json" @@ -18,13 +18,13 @@ release() { export NODE_AUTH_TOKEN="$NPM_TOKEN" npm publish "$NEXT_RELEASE_VERSION" --userconfig "$TEMP_FILE" - echo "Published [$NEXT_RELEASE_TAG]!" + log "Published [$NEXT_RELEASE_TAG]!" rm -rf "$TEMP_FILE" else log "Skipped npm tag [$NEXT_RELEASE_TAG] in DRY-RUN mode." fi else - echo " + printf "%s\n" " npm Token is not found Please export npm Token so this plugin can be used "