Skip to content

Commit

Permalink
Perform Maven/Gradle check in the projectBaseDir (#19)
Browse files Browse the repository at this point in the history
Co-authored-by: Tom <tom.vanbraband@sonarsource.com>
  • Loading branch information
workshur and tom-vanbraband-sonarsource authored Aug 15, 2022
1 parent 64d3b08 commit 156db6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ if [[ -z "${SONAR_TOKEN}" ]]; then
exit 1
fi

if [[ -f "pom.xml" ]]; then
if [[ -f "${INPUT_PROJECTBASEDIR%/}/pom.xml" ]]; then
echo "Maven project detected. You should run the goal 'org.sonarsource.scanner.maven:sonar' during build rather than using this GitHub Action."
exit 1
fi

if [[ -f "build.gradle" ]]; then
if [[ -f "${INPUT_PROJECTBASEDIR%/}/build.gradle" ]]; then
echo "Gradle project detected. You should use the SonarQube plugin for Gradle during build rather than using this GitHub Action."
exit 1
fi
Expand Down

0 comments on commit 156db6f

Please sign in to comment.