forked from DotNetAnalyzers/PublicApiAnalyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
35 lines (34 loc) · 1.31 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
version: 1.0.{build}
os: Visual Studio 2017
init:
- git config --global core.autocrlf true
configuration:
- Debug
- Release
before_build:
- nuget restore
skip_tags: true
build:
project: PublicApiAnalyzer.sln
verbosity: minimal
test_script:
- cd build
- ps: |
if ($env:Configuration -eq 'Debug') {
.\opencover-report.ps1 -Debug -NoBuild -NoReport -AppVeyor
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
$packageConfig = [xml](Get-Content ..\.nuget\packages.config)
$codecov_version = $packageConfig.SelectSingleNode('/packages/package[@id="Codecov"]').version
$codecov = "..\packages\Codecov.$codecov_version\tools\codecov.exe"
&$codecov -f '..\build\OpenCover.Reports\OpenCover.PublicApiAnalyzer.xml'
} else {
.\opencover-report.ps1 -NoBuild -NoReport -AppVeyor
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
}
# preserve "packages" directory in the root of build folder but will reset it if packages.config is modified
cache:
- packages -> **\packages.config
# 'Release' is hard-coded to ensure VSIX and NuGet artifacts are only published for release configuration builds
artifacts:
- path: 'PublicApiAnalyzer\PublicApiAnalyzer.Vsix\bin\Release\net452\*.vsix'
- path: 'PublicApiAnalyzer\PublicApiAnalyzer.CodeFixes\bin\Release\*.nupkg'