diff --git a/README.md b/README.md index 4cddbd0..4d0296d 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,7 @@ _Currently does not support username/password authentication and presumes you ar projectKey: a-project-key projectName: a-project-name sonarOrganisation: an-org - verbose: "true" - openCoverPaths: "tests/coverage.opencover.xml" - coverageExclusions: "**test*.cs" + beginArguments: /d:sonar.verbose="true" /d:sonar.cs.opencover.reportsPaths="/path/to/coverage.xml" /d:sonar.coverage.exclusions="**/*.cs" env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -45,15 +43,11 @@ sonarHostname: sonarOrganisation: description: "Organisation" required: true -verbose: - default: "false" - description: "Enable verbose logging" +beginArguments: + description: "Arguments to append to the begin command" required: false -openCoverPaths: - description: "Path(s) to coverage file(s)" - required: false -coverageExclusions: - description: "Glob(s) for files to exclude from coverage" +endArguments: + description: "Arguments to append to the end command" required: false ``` diff --git a/action.yml b/action.yml index 72d50db..96c6310 100644 --- a/action.yml +++ b/action.yml @@ -22,15 +22,11 @@ inputs: sonarOrganisation: description: "Organisation" required: true - verbose: - default: "false" - description: "Enable verbose logging" + beginArguments: + description: "Arguments to append to the begin command" required: false - openCoverPaths: - description: "Path(s) to coverage file(s)" - required: false - coverageExclusions: - description: "Glob(s) for files to exclude from coverage" + endArguments: + description: "Arguments to append to the end command" required: false runs: @@ -43,9 +39,8 @@ runs: - ${{ inputs.projectName }} - ${{ inputs.sonarHostname }} - ${{ inputs.sonarOrganisation }} - - ${{ inputs.verbose }} - - ${{ inputs.openCoverPaths }} - - ${{ inputs.coverageExclusions }} + - ${{ inputs.beginArguments }} + - ${{ inputs.endArguments }} branding: icon: 'check' diff --git a/entrypoint.sh b/entrypoint.sh index a6f96b7..90672d2 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,9 +6,8 @@ # projectName = $4 # sonarHostname = $5 # sonarOrganisation = $6 -# verbose = $7 -# openCoverPaths = $8 -# coverageExclusions = $9 +# beginArguments = $7 +# endArguments = $8 set -eu @@ -37,12 +36,12 @@ fi if [ -n "$7" ] then - begin_cmd="$begin_cmd /d:sonar.verbose=\"$7\"" + begin_cmd="$begin_cmd $7" fi if [ -n "$8" ] then - begin_cmd="$begin_cmd /d:sonar.cs.opencover.reportsPaths=\"$8\"" + end_cmd="$end_cmd $8" fi if [ -n "$9" ]