@@ -2,21 +2,36 @@ version: '{build}'
22image : Visual Studio 2017
33init :
44- git config --global core.autocrlf true
5+ configuration :
6+ - Debug
7+ - Release
58before_build :
69- nuget restore
710build :
811 project : DocumentationAnalyzers.sln
912 verbosity : minimal
1013test_script :
1114- cd build
12- - ps : .\opencover-report.ps1 -Debug -NoBuild -NoReport -AppVeyor
15+ - ps : |
16+ if ($env:Configuration -eq 'Debug') {
17+ .\opencover-report.ps1 -Debug -NoBuild -NoReport -AppVeyor
18+ if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
19+ $packageConfig = [xml](Get-Content ..\.nuget\packages.config)
20+ $codecov_version = $packageConfig.SelectSingleNode('/packages/package[@id="Codecov"]').version
21+ $codecov = "..\packages\Codecov.$codecov_version\tools\codecov.exe"
22+ &$codecov -f '..\build\OpenCover.Reports\OpenCover.DocumentationAnalyzers.xml'
23+ } else {
24+ .\opencover-report.ps1 -NoBuild -NoReport -AppVeyor
25+ if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
26+ }
1327 - cd ..
14- - .\packages\Codecov.1.0.1\tools\codecov.exe -f ".\build\OpenCover.Reports\OpenCover.DocumentationAnalyzers.xml"
15- - .\DocumentationAnalyzers\DocumentationAnalyzers.Status.Generator\bin\Debug\net46\DocumentationAnalyzers.Status.Generator.exe .\DocumentationAnalyzers.sln > DocumentationAnalyzers.Status.json
28+ - .\DocumentationAnalyzers\DocumentationAnalyzers.Status.Generator\bin\%Configuration%\net46\DocumentationAnalyzers.Status.Generator.exe .\DocumentationAnalyzers.sln > DocumentationAnalyzers.Status.json
1629cache :
1730 - packages -> **\packages.config
1831 - C:\Users\appveyor\.nuget\packages -> appveyor.yml
32+
33+ # 'Release' is hard-coded to ensure VSIX and NuGet artifacts are only published for release configuration builds
1934artifacts :
20- - path : ' DocumentationAnalyzers\** \*.vsix'
21- - path : ' DocumentationAnalyzers\** \*.nupkg'
35+ - path : ' DocumentationAnalyzers\DocumentationAnalyzers.Vsix\bin\Release\net452 \*.vsix'
36+ - path : ' DocumentationAnalyzers\DocumentationAnalyzers.CodeFixes\bin\Release \*.nupkg'
2237- path : ' DocumentationAnalyzers.Status.json'
0 commit comments