Skip to content

Commit

Permalink
feat: deprecation messages and exits (#31)
Browse files Browse the repository at this point in the history
* feat: deprecation messages and exits
  • Loading branch information
DerekRoberts authored Aug 14, 2023
1 parent b847dd0 commit 370ba8f
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ inputs:
description: App/package directory
required: true

### Typical / recommended
node_version:
description: Node version to use
required: true

### Typical / recommended
sonar_args:
# https://docs.sonarcloud.io/advanced-setup/analysis-parameters/
description: SonarCloud command line arguments
Expand Down Expand Up @@ -54,6 +54,32 @@ runs:
fetch-depth: 0
repository: ${{ inputs.repository }}
ref: ${{ inputs.branch }}

- name: Warnings for breaking changes
shell: bash
run: |
# Warnings for breaking changes
# node_version now required
if [ -z "${{ inputs.node_version }}" ]; then
echo -e "\nnode_version now required. Previous default: 16."
echo -e "\n\tAction: add a node_version parameter\n"
exit 1
fi
# sonar_project_token renamed sonar_token
if [ ! -z "${{ inputs.sonar_project_token }}" ]; then
echo -e "\nsonar_project_token renamed. Please correct this and try again."
echo -e "\n\tAction: rename sonar_project_token to sonar_token\n"
exit 1
fi
#
if [ ! -z "${{ inputs.sonar_comment_token }}" ]; then
echo -e "\nsonar_comment_token deprecated. Please correct this and try again."
echo -e "\n\tAction: remove sonar_comment_token parameter\n"
exit 1
fi
# Process variables and inputs
- id: vars
Expand Down

0 comments on commit 370ba8f

Please sign in to comment.