浏览代码

Update sonar.yml

/main/sonarqube
GitHub 3 年前
当前提交
749f6052
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 6
      .yamato/sonar.yml

6
.yamato/sonar.yml


image: package-ci/mac
flavor: m1.mac
variables:
PROJECT_PATH:
SONARQUBE_PROJECT_KEY: ai-robotics-inverse-dynamics-csharp
SONARQUBE_PROJECT_BASE_DIR: /Users/bokken/build/output/Unity-Technologies/
MSBUILD_SLN_PATH: ./unity-inverse-dynamics-demo.sln

- curl https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.2.1.31210/sonar-scanner-msbuild-5.2.1.31210-net46.zip -o sonar-scanner-msbuild-net46.zip -L
- unzip sonar-scanner-msbuild-net46.zip -d ~/sonar-scanner-msbuild
- chmod a+x ~/sonar-scanner-msbuild/sonar-scanner-4.6.1.2450/bin/sonar-scanner
- .Editor/Unity.app/Contents/MacOS/Unity -projectPath $PROJECT_PATH -batchmode -quit -nographics -logFile - -executeMethod "UnityEditor.SyncVS.SyncSolution"
- .Editor/Unity.app/Contents/MacOS/Unity -batchmode -quit -nographics -logFile - -executeMethod "UnityEditor.SyncVS.SyncSolution"
cd $PROJECT_PATH
for file in *.csproj; do sed -i.backup "s/^[[:blank:]]*<ReferenceOutputAssembly>false<\/ReferenceOutputAssembly>/<ReferenceOutputAssembly>true<\/ReferenceOutputAssembly>/g" $file; rm $file.backup; done
cd $PROJECT_ROOT
- mono ~/sonar-scanner-msbuild/SonarScanner.MSBuild.exe begin /k:$SONARQUBE_PROJECT_KEY /d:sonar.host.url=$SONARQUBE_ENDPOINT_URL_PRD /d:sonar.login=$SONARQUBE_TOKEN_PRD /d:sonar.projectBaseDir=$SONARQUBE_PROJECT_BASE_DIR

expression: |
((pull_request.target eq "main" OR pull_request.target eq "dev")
AND NOT pull_request.push.changes.all match "**/*.md") OR
(push.branch eq "main" OR push.branch eq "dev")
(push.branch eq "main" OR push.branch eq "dev")
正在加载...
取消
保存