Skip to content

Commit 837bda2

Browse files
authored
Merge pull request #38 from sharwell/build-release
Build debug and release configurations on AppVeyor
2 parents f92f58c + bb8a7e1 commit 837bda2

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

.nuget/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Codecov" version="1.0.1" />
3+
<package id="Codecov" version="1.1.0" />
44
<package id="Microsoft.DiaSymReader.Pdb2Pdb" version="1.1.0-beta1-62624-01" />
55
<package id="OpenCover" version="4.6.519" />
66
<package id="ReportGenerator" version="2.3.5.0" targetFramework="net452" />

appveyor.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,36 @@ version: '{build}'
22
image: Visual Studio 2017
33
init:
44
- git config --global core.autocrlf true
5+
configuration:
6+
- Debug
7+
- Release
58
before_build:
69
- nuget restore
710
build:
811
project: DocumentationAnalyzers.sln
912
verbosity: minimal
1013
test_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
1629
cache:
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
1934
artifacts:
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'

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ <h3>Commit information</h3>
173173
</script>
174174

175175
<script type="text/javascript">
176-
$.getJSON("https://ci.appveyor.com/api/projects/sharwell/Documentationanalyzers/artifacts/DocumentationAnalyzers.Status.json?branch=master&pr=false&stream=true", function (data) {
176+
$.getJSON("https://ci.appveyor.com/api/projects/sharwell/Documentationanalyzers/artifacts/DocumentationAnalyzers.Status.json?branch=master&pr=false&stream=true&job=Configuration:%20Release", function (data) {
177177
$("#renderedDiagnostics").html($.templates($("#diagnostics").html()).render(data));
178178
$("#renderedCommitInfo").html($.templates($("#commitInfo").html()).render(data.git));
179179
});

0 commit comments

Comments
 (0)