From 156db6fef3e168e4972abb76de0b32bbce8ec77a Mon Sep 17 00:00:00 2001 From: Oleg Shur Date: Mon, 15 Aug 2022 12:20:28 +0300 Subject: [PATCH] Perform Maven/Gradle check in the projectBaseDir (#19) Co-authored-by: Tom --- entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 3f4db4e..d6922f4 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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