diff --git a/.github/workflows/push-tag-to-extensions.yml b/.github/workflows/push-tag-to-extensions.yml index 2198de3..6be0b67 100644 --- a/.github/workflows/push-tag-to-extensions.yml +++ b/.github/workflows/push-tag-to-extensions.yml @@ -22,6 +22,8 @@ jobs: version=$(cat scripts/version.sh | grep 'CODECOV_WRAPPER_VERSION=' | cut -d\" -f2) echo $version echo "CODECOV_WRAPPER_VERSION=$version" >> $GITHUB_OUTPUT + env_changes=$(git diff $(git tag --sort version:refname | tail -n 2 | head -n 1) $(git tag --sort version:refname | tail -n 1) env) + echo "CODECOV_ENV_CHANGES=$env_changes" >> $GITHUB_OUTPUT bitrise-step: needs: set-version @@ -29,6 +31,7 @@ jobs: with: repository: "codecov-bitrise" version: "${{ needs.set-version.outputs.CODECOV_WRAPPER_VERSION }}" + env_changes: "${{ needs.set-version.outputs.CODECOV_ENV_CHANGES }}" secrets: inherit circleci-orb: @@ -37,6 +40,7 @@ jobs: with: repository: "codecov-circleci-orb" version: "${{ needs.set-version.outputs.CODECOV_WRAPPER_VERSION }}" + env_changes: "${{ needs.set-version.outputs.CODECOV_ENV_CHANGES }}" secrets: inherit github-action: @@ -45,4 +49,5 @@ jobs: with: repository: "codecov-action" version: "${{ needs.set-version.outputs.CODECOV_WRAPPER_VERSION }}" + env_changes: "${{ needs.set-version.outputs.CODECOV_ENV_CHANGES }}" secrets: inherit diff --git a/.github/workflows/push-tag.yml b/.github/workflows/push-tag.yml index 22fb369..6cecddb 100644 --- a/.github/workflows/push-tag.yml +++ b/.github/workflows/push-tag.yml @@ -10,6 +10,9 @@ on: # yamllint disable-line rule:truthy version: required: true type: string + env_changes: + required: true + type: string jobs: run: @@ -24,6 +27,7 @@ jobs: run: | echo "repository: ${{ inputs.repository }}" echo "version: ${{ inputs.version }}" + echo "env_changes: ${{ inputs.env_changes }}" - name: Generate a token id: app-token @@ -65,7 +69,6 @@ jobs: - name: Create pull request into main run: | - ENV_CHANGES=$(git diff $(git tag --sort version:refname | tail -n 2 | head -n 1) $(git tag --sort version:refname | tail -n 1) env) - gh pr create --title "chore(release): wrapper -${{ inputs.version }}" --body "$ENV_CHANGES" --base "main" + gh pr create --title "chore(release): wrapper -${{ inputs.version }}" --body "${{ inputs.env_changes }}" --base "main" env: GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} diff --git a/dist/codecov.sh b/dist/codecov.sh index 44fdf69..065c30d 100755 --- a/dist/codecov.sh +++ b/dist/codecov.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -CC_WRAPPER_VERSION="0.0.33" +CC_WRAPPER_VERSION="0.0.34" set +u say() { echo -e "$1" @@ -232,6 +232,9 @@ cc_run_args+=( $(k_arg SHA) $(v_arg SHA)) cc_run_args+=( $(write_truthy_args CC_FAIL_ON_ERROR) ) cc_run_args+=( $(k_arg GIT_SERVICE) $(v_arg GIT_SERVICE)) cc_run_args+=( $(k_arg SLUG) $(v_arg SLUG)) +else + exit_if_error "Invalid run command specified: $CC_RUN_COMMAND" + exit fi unset NODE_OPTIONS # See https://github.com/codecov/uploader/issues/475 diff --git a/scripts/run_command.sh b/scripts/run_command.sh index 5ffe111..1a49d30 100755 --- a/scripts/run_command.sh +++ b/scripts/run_command.sh @@ -8,6 +8,9 @@ elif [ "$CODECOV_RUN_COMMAND" == "pr-base-picking" ]; then . ./set_pr_base_picking_args.sh elif [ "$CODECOV_RUN_COMMAND" == "send-notifications" ]; then . ./set_send_notifications_args.sh +else + exit_if_error "Invalid run command specified: $CODECOV_RUN_COMMAND" + exit fi unset NODE_OPTIONS diff --git a/scripts/version.sh b/scripts/version.sh index 77e0a56..249a5f4 100755 --- a/scripts/version.sh +++ b/scripts/version.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -CODECOV_WRAPPER_VERSION="0.0.33" +CODECOV_WRAPPER_VERSION="0.0.34"