From f9c90dbc74bf6841e71a2d69f2532f6e8b2efaa5 Mon Sep 17 00:00:00 2001 From: Petr Jandak Date: Mon, 14 Aug 2017 16:23:19 +0200 Subject: [PATCH 1/3] adding quotes to projectfile in case project name is from two words --- src/main/shell/run-sonar-swift.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/shell/run-sonar-swift.sh b/src/main/shell/run-sonar-swift.sh index c885958b..56d4a9b1 100755 --- a/src/main/shell/run-sonar-swift.sh +++ b/src/main/shell/run-sonar-swift.sh @@ -184,7 +184,7 @@ testScheme=''; readParameter testScheme 'sonar.swift.testScheme' # The name of your binary file (application) binaryName=''; readParameter binaryName 'sonar.swift.appName' # Get the path of plist file -plistFile=`xcodebuild -showBuildSettings -project ${projectFile} | grep -i 'PRODUCT_SETTINGS_PATH' -m 1 | sed 's/[ ]*PRODUCT_SETTINGS_PATH = //'` +plistFile=`xcodebuild -showBuildSettings -project "${projectFile}" | grep -i 'PRODUCT_SETTINGS_PATH' -m 1 | sed 's/[ ]*PRODUCT_SETTINGS_PATH = //'` # Number version from plist if no sonar.projectVersion numVerionFromPlist=`defaults read ${plistFile} CFBundleShortVersionString` @@ -310,7 +310,7 @@ if [ "$unittests" = "on" ]; then slatherCmd+=( --scheme "$appScheme" "$firstProject") echo "${slatherCmd[@]}" - + runCommand /dev/stdout "${slatherCmd[@]}" mv sonar-reports/cobertura.xml sonar-reports/coverage-swift.xml fi From 22d0ef9bdbb8a81bd0a63050e0ddafade41f0c69 Mon Sep 17 00:00:00 2001 From: Petr Jandak Date: Tue, 15 Aug 2017 13:13:00 +0200 Subject: [PATCH 2/3] removing extra line --- src/main/shell/run-sonar-swift.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/shell/run-sonar-swift.sh b/src/main/shell/run-sonar-swift.sh index 56d4a9b1..28843624 100755 --- a/src/main/shell/run-sonar-swift.sh +++ b/src/main/shell/run-sonar-swift.sh @@ -310,7 +310,6 @@ if [ "$unittests" = "on" ]; then slatherCmd+=( --scheme "$appScheme" "$firstProject") echo "${slatherCmd[@]}" - runCommand /dev/stdout "${slatherCmd[@]}" mv sonar-reports/cobertura.xml sonar-reports/coverage-swift.xml fi From 7701ad40b2a2afa5315e8e3766683db8e4b5a727 Mon Sep 17 00:00:00 2001 From: Petr Jandak Date: Tue, 15 Aug 2017 15:10:45 +0200 Subject: [PATCH 3/3] removing space --- src/main/shell/run-sonar-swift.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/shell/run-sonar-swift.sh b/src/main/shell/run-sonar-swift.sh index 28843624..8c240b71 100755 --- a/src/main/shell/run-sonar-swift.sh +++ b/src/main/shell/run-sonar-swift.sh @@ -310,6 +310,7 @@ if [ "$unittests" = "on" ]; then slatherCmd+=( --scheme "$appScheme" "$firstProject") echo "${slatherCmd[@]}" + runCommand /dev/stdout "${slatherCmd[@]}" mv sonar-reports/cobertura.xml sonar-reports/coverage-swift.xml fi