Perform Maven/Gradle check in the projectBaseDir (#19)

Co-authored-by: Tom <tom.vanbraband@sonarsource.com>
This commit is contained in:
Oleg Shur 2022-08-15 12:20:28 +03:00 committed by GitHub
commit 156db6fef3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,12 +7,12 @@ if [[ -z "${SONAR_TOKEN}" ]]; then
exit 1 exit 1
fi 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." echo "Maven project detected. You should run the goal 'org.sonarsource.scanner.maven:sonar' during build rather than using this GitHub Action."
exit 1 exit 1
fi 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." echo "Gradle project detected. You should use the SonarQube plugin for Gradle during build rather than using this GitHub Action."
exit 1 exit 1
fi fi