Skip to content

Commit c740a34

Browse files
committed
Fix QA
1 parent d5ec44c commit c740a34

File tree

1 file changed

+11
-27
lines changed

1 file changed

+11
-27
lines changed

cix.sh

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,18 @@
33
set -euo pipefail
44
set -x
55

6-
# if the version of the Scanner is "DEV", we build the version deployed in repox using the current assembly version and the build number (CI_BUILD_NUMBER)
7-
get_version() {
8-
if [ "DEV" == "$1" ]; then
9-
local assemblyInfoFile=../AssemblyInfo.Shared.cs
10-
local version=`sed -n "s|\[assembly: AssemblyVersion(\"\([0-9.]*\)\")\]|\1|p" $assemblyInfoFile | sed 's/\r//'`
11-
12-
if [ -z $version ]; then
13-
echo "Failed to find assembly version in $assemblyInfoFile"
14-
exit 1
15-
fi
16-
17-
output="${version}.${CI_BUILD_NUMBER}"
18-
else
19-
output=$1
20-
fi
21-
}
22-
23-
cd its
6+
# use the version deployed in repox using the current assembly version and the build number (CI_BUILD_NUMBER)
7+
version=`sed -n "s|\[assembly: AssemblyVersion(\"\([0-9.]*\)\")\]|\1|p" AssemblyInfo.Shared.cs | sed 's/\r//'`
248

25-
get_version $SCANNER_VERSION
26-
if [ "DEV" == "$SCANNER_VERSION" ]; then
27-
#store version for artifact promotion
28-
echo "ARTIFACT=org/sonarsource/scanner/msbuild/sonar-scanner-msbuild/$output" > ../artifact.properties
9+
if [ -z $version ]; then
10+
echo "Failed to find assembly version"
11+
exit 1
2912
fi
30-
SCANNER_VERSION=$output
13+
14+
SCANNER_VERSION="${version}.${CI_BUILD_NUMBER}"
3115

32-
get_version $SCANNER_PAYLOAD_VERSION
33-
SCANNER_PAYLOAD_VERSION=$output
16+
#store version for artifact promotion
17+
echo "ARTIFACT=org/sonarsource/scanner/msbuild/sonar-scanner-msbuild/$SCANNER_VERSION" > artifact.properties
3418

35-
# default versions of csharp and vbnet plugin are defined in the pom file
36-
mvn -B -e verify -Dsonar.runtimeVersion=$SQ_VERSION -DscannerForMSBuild.version=$SCANNER_VERSION -DscannerForMSBuildPayload.version=$SCANNER_PAYLOAD_VERSION -Dmsbuild.path=$MSBUILD_PATH
19+
cd its
20+
mvn -B -e verify -Dsonar.runtimeVersion=$SQ_VERSION -DscannerForMSBuild.version=$SCANNER_VERSION -Dmsbuild.path=$MSBUILD_PATH

0 commit comments

Comments
 (0)