Skip to content

Commit 920e596

Browse files
committed
Fix build breaks on appveyor
1 parent 64a07e2 commit 920e596

File tree

6 files changed

+36
-175
lines changed

6 files changed

+36
-175
lines changed

CI/build.msbuild

Lines changed: 0 additions & 58 deletions
This file was deleted.

LibGit2Sharp.sln

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25123.0
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26228.4
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibGit2Sharp", "LibGit2Sharp\LibGit2Sharp.csproj", "{EE6ED99F-CB12-4683-B055-D28FC7357A34}"
77
EndProject
@@ -23,15 +23,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeGeneration.Debugging",
2323
EndProject
2424
Global
2525
GlobalSection(SharedMSBuildProjectFiles) = preSolution
26-
LibGit2Sharp.Tests.Shared\LibGit2Sharp.Tests.Shared.projitems*{b9582325-8252-4281-a071-903a356d335f}*SharedItemsImports = 4
27-
CodeGenerationAttributes.Shared\CodeGenerationAttributes.Shared.projitems*{b1273734-6e0a-4097-b1cb-6925013dc809}*SharedItemsImports = 13
26+
LibGit2Sharp.Tests.Shared\LibGit2Sharp.Tests.Shared.projitems*{286e63eb-04dd-4ade-88d6-041b57800761}*SharedItemsImports = 4
2827
CodeGenerationAttributes.Shared\CodeGenerationAttributes.Shared.projitems*{e1a8b99f-b2f6-4a38-9df6-8792056d70ff}*SharedItemsImports = 4
29-
CodeGenerationAttributes.Shared\CodeGenerationAttributes.Shared.projitems*{f8f482fc-1b76-46f5-b1d8-3ddbbd18d1e4}*SharedItemsImports = 4
3028
LibGit2Sharp.Shared\LibGit2Sharp.Shared.projitems*{ee6ed99f-cb12-4683-b055-d28fc7357a34}*SharedItemsImports = 4
31-
LibGit2Sharp.Shared\LibGit2Sharp.Shared.projitems*{39fdd325-625a-4619-a8a9-4e061d0f993f}*SharedItemsImports = 4
32-
LibGit2Sharp.Tests.Shared\LibGit2Sharp.Tests.Shared.projitems*{286e63eb-04dd-4ade-88d6-041b57800761}*SharedItemsImports = 4
33-
LibGit2Sharp.Shared\LibGit2Sharp.Shared.projitems*{de74d271-f14a-4d22-a738-1cab045ecc79}*SharedItemsImports = 13
34-
LibGit2Sharp.Tests.Shared\LibGit2Sharp.Tests.Shared.projitems*{564101fc-941a-44b5-9993-ffe481a05d9f}*SharedItemsImports = 13
3529
EndGlobalSection
3630
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3731
Debug|Any CPU = Debug|Any CPU
@@ -46,14 +40,6 @@ Global
4640
{286E63EB-04DD-4ADE-88D6-041B57800761}.Debug|Any CPU.Build.0 = Debug|Any CPU
4741
{286E63EB-04DD-4ADE-88D6-041B57800761}.Release|Any CPU.ActiveCfg = Release|Any CPU
4842
{286E63EB-04DD-4ADE-88D6-041B57800761}.Release|Any CPU.Build.0 = Release|Any CPU
49-
{39FDD325-625A-4619-A8A9-4E061D0F993F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
50-
{39FDD325-625A-4619-A8A9-4E061D0F993F}.Debug|Any CPU.Build.0 = Debug|Any CPU
51-
{39FDD325-625A-4619-A8A9-4E061D0F993F}.Release|Any CPU.ActiveCfg = Release|Any CPU
52-
{39FDD325-625A-4619-A8A9-4E061D0F993F}.Release|Any CPU.Build.0 = Release|Any CPU
53-
{F8F482FC-1B76-46F5-B1D8-3DDBBD18D1E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
54-
{F8F482FC-1B76-46F5-B1D8-3DDBBD18D1E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
55-
{F8F482FC-1B76-46F5-B1D8-3DDBBD18D1E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
56-
{F8F482FC-1B76-46F5-B1D8-3DDBBD18D1E4}.Release|Any CPU.Build.0 = Release|Any CPU
5743
{E1A8B99F-B2F6-4A38-9DF6-8792056D70FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
5844
{E1A8B99F-B2F6-4A38-9DF6-8792056D70FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
5945
{E1A8B99F-B2F6-4A38-9DF6-8792056D70FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -66,21 +52,10 @@ Global
6652
{C9212ECC-76F0-4658-9C89-DD506EE788B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
6753
{C9212ECC-76F0-4658-9C89-DD506EE788B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
6854
{C9212ECC-76F0-4658-9C89-DD506EE788B5}.Release|Any CPU.Build.0 = Release|Any CPU
69-
{B9582325-8252-4281-A071-903A356D335F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
70-
{B9582325-8252-4281-A071-903A356D335F}.Debug|Any CPU.Build.0 = Debug|Any CPU
71-
{B9582325-8252-4281-A071-903A356D335F}.Release|Any CPU.ActiveCfg = Release|Any CPU
72-
{B9582325-8252-4281-A071-903A356D335F}.Release|Any CPU.Build.0 = Release|Any CPU
7355
EndGlobalSection
7456
GlobalSection(SolutionProperties) = preSolution
7557
HideSolutionNode = FALSE
7658
EndGlobalSection
77-
GlobalSection(NestedProjects) = preSolution
78-
{B1273734-6E0A-4097-B1CB-6925013DC809} = {5BDCC83F-0B36-47C2-B5E3-A5B09BD47DA0}
79-
{F8F482FC-1B76-46F5-B1D8-3DDBBD18D1E4} = {5BDCC83F-0B36-47C2-B5E3-A5B09BD47DA0}
80-
{E1A8B99F-B2F6-4A38-9DF6-8792056D70FF} = {5BDCC83F-0B36-47C2-B5E3-A5B09BD47DA0}
81-
{6598997B-9419-4CC1-84FF-9621B555E9C0} = {5BDCC83F-0B36-47C2-B5E3-A5B09BD47DA0}
82-
{C9212ECC-76F0-4658-9C89-DD506EE788B5} = {5BDCC83F-0B36-47C2-B5E3-A5B09BD47DA0}
83-
EndGlobalSection
8459
GlobalSection(MonoDevelopProperties) = preSolution
8560
Policies = $0
8661
$0.TextStylePolicy = $4
@@ -97,7 +72,6 @@ Global
9772
$2.inheritsScope = text/x-csharp
9873
$2.scope = text/x-csharp
9974
$0.StandardHeader = $3
100-
$3.Text =
10175
$3.inheritsSet = Apache2License
10276
$4.FileWidth = 120
10377
$4.RemoveTrailingWhitespace = True

LibGit2Sharp/LibGit2Sharp.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
<PackageReference Include="CodeGeneration.Roslyn.BuildTime" Version="0.2.10" PrivateAssets="all" />
3737
<PackageReference Include="System.Security.SecureString" Version="4.0.0" Condition=" '$(TargetFramework)' == 'netstandard1.3' " />
3838
<PackageReference Include="System.IO.UnmanagedMemoryStream" Version="4.0.1" Condition=" '$(TargetFramework)' == 'netstandard1.3' " />
39+
<PackageReference Include="System.Diagnostics.TraceSource" Version="4.0.0" Condition=" '$(TargetFramework)' == 'netstandard1.3' " />
40+
<PackageReference Include="SourceLink.Create.GitHub" Version="2.0.2" PrivateAssets="all" />
41+
<DotNetCliToolReference Include="dotnet-sourcelink-git" Version="2.0.2" />
3942
</ItemGroup>
4043
<Import Project="CodeGenerator.targets" />
4144
<Import Project="ExtraDefine.targets" />

appveyor.yml

Lines changed: 20 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
version: '{build}'
22

3-
os: Visual Studio 2015
3+
os: Visual Studio 2017
44

55
branches:
66
only:
77
- master
88
- /^maint.*/
9-
- portable
9+
- /portable.*/
10+
11+
configuration: release
1012

1113
skip_tags: true
1214

13-
clone_folder: C:\projects\libgit2sharp
15+
nuget:
16+
disable_publish_on_pr: true
1417

1518
environment:
1619
coveralls_token:
@@ -61,94 +64,55 @@ install:
6164
Write-Host "Should run Coverity analysis = " -NoNewLine
6265
Write-Host $Env:SHOULD_RUN_COVERITY_ANALYSIS -ForegroundColor "Green"
6366
64-
$Env:SHOULD_PACKAGE_NUGET_ARTIFACT = -not $Env:APPVEYOR_PULL_REQUEST_NUMBER -and -not $Env:APPVEYOR_SCHEDULED_BUILD
65-
Write-Host "Should package Nuget artifact = " -NoNewLine
66-
Write-Host $Env:SHOULD_PACKAGE_NUGET_ARTIFACT -ForegroundColor "Green"
67-
6867
$Env:SHOULD_RUN_COVERALLS = $($Env:APPVEYOR_SCHEDULED_BUILD -eq $True)
6968
Write-Host "Should run Coveralls = " -NoNewLine
7069
Write-Host $Env:SHOULD_RUN_COVERALLS -ForegroundColor "Green"
7170
7271
Write-Host "Should publish on success = " -NoNewLine
7372
Write-Host $Env:publish_on_success -ForegroundColor "Green"
7473
75-
If ($Env:SHOULD_PACKAGE_NUGET_ARTIFACT -eq $True)
76-
{
77-
cinst sourcelink -y
78-
}
79-
8074
If ($Env:SHOULD_RUN_COVERALLS -eq $True)
8175
{
82-
lib\nuget\nuget.exe install OpenCover -Version 4.6.166 -ExcludeVersion -OutputDirectory .\packages
83-
lib\nuget\nuget.exe install coveralls.net -Version 0.6.0 -ExcludeVersion -OutputDirectory .\packages
76+
nuget install OpenCover -Version 4.6.166 -ExcludeVersion -OutputDirectory .\packages
77+
nuget install coveralls.net -Version 0.6.0 -ExcludeVersion -OutputDirectory .\packages
8478
}
8579
8680
If ($Env:SHOULD_RUN_COVERITY_ANALYSIS -eq $True)
8781
{
8882
cinst curl -y
8983
}
9084
91-
assembly_info:
92-
patch: true
93-
file: LibGit2Sharp.Shared\Properties\AssemblyInfo.cs
94-
assembly_version: '$(VERSION)'
95-
assembly_file_version: '$(VERSION)'
96-
assembly_informational_version: '$(ASSEMBLY_INFORMATIONAL_VERSION)'
97-
98-
cache:
99-
- packages
100-
10185
before_build:
10286
- ps: |
103-
& "$Env:APPVEYOR_BUILD_FOLDER\lib\nuget\nuget.exe" restore "$Env:APPVEYOR_BUILD_FOLDER\LibGit2Sharp.sln"
87+
dotnet restore
10488
10589
build_script:
10690
- ps: |
107-
& msbuild "$Env:APPVEYOR_BUILD_FOLDER\LibGit2Sharp.sln" `
91+
dotnet msbuild "$Env:APPVEYOR_BUILD_FOLDER\LibGit2Sharp.sln" `
10892
/verbosity:normal `
109-
/p:Configuration=Release `
110-
/logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" `
111-
/property:ExtraDefine="LEAKS_IDENTIFYING"
93+
/property:ExtraDefine="LEAKS_IDENTIFYING" `
94+
/t:build,pack
11295
11396
test_script:
11497
- ps: |
11598
If ($Env:SHOULD_RUN_COVERALLS -eq $True -and $Env:publish_on_success -eq $True)
11699
{
117100
.\packages\OpenCover\tools\OpenCover.Console.exe `
118101
-register:user `
119-
"-target:""$Env:APPVEYOR_BUILD_FOLDER\packages\xunit.runner.console.2.0.0\tools\$Env:xunit_runner""" `
120-
"-targetargs:""$Env:APPVEYOR_BUILD_FOLDER\LibGit2Sharp.Tests\bin\Release\LibGit2Sharp.Tests.dll"" -noshadow" `
102+
"-target:""$Env:userprofile\.nuget\packages\xunit.runner.console\2.0.0\tools\$Env:xunit_runner""" `
103+
"-targetargs:""$Env:APPVEYOR_BUILD_FOLDER\LibGit2Sharp.Tests\bin\Release\net46\LibGit2Sharp.Tests.dll"" -noshadow" `
121104
"-filter:+[LibGit2Sharp]* -[LibGit2Sharp.Tests]*" `
122105
-hideskipped:All `
123106
-output:opencoverCoverage.xml
124107
}
125108
ElseIf ($Env:SHOULD_RUN_COVERITY_ANALYSIS -eq $False)
126109
{
127-
& "$Env:APPVEYOR_BUILD_FOLDER\packages\xunit.runner.console.2.0.0\tools\$Env:xunit_runner" `
128-
"$Env:APPVEYOR_BUILD_FOLDER\LibGit2Sharp.Tests\bin\Release\LibGit2Sharp.Tests.dll" -noshadow
110+
& "$Env:userprofile\.nuget\packages\xunit.runner.console\2.0.0\tools\$Env:xunit_runner" `
111+
"$Env:APPVEYOR_BUILD_FOLDER\LibGit2Sharp.Tests\bin\Release\net46\LibGit2Sharp.Tests.dll" -noshadow
129112
}
130113
131114
after_test:
132115
- ps: |
133-
If ($Env:SHOULD_PACKAGE_NUGET_ARTIFACT -eq $True -and $Env:publish_on_success -eq $True)
134-
{
135-
& "$Env:APPVEYOR_BUILD_FOLDER\nuget.package\BuildNugetPackage.ps1" `
136-
-commitSha "$Env:APPVEYOR_REPO_COMMIT" `
137-
-postBuild { sourcelink index `
138-
-pr LibGit2Sharp.csproj `
139-
-pp Configuration Release `
140-
-nf Core\NativeDllName.cs `
141-
-nf Core\UniqueIdentifier.cs `
142-
-nf Properties\AssemblyInfo.cs `
143-
-r .. `
144-
-u 'https://raw.githubusercontent.com/libgit2/libgit2sharp/{0}/%var2%' }
145-
146-
Add-Type -Path "$Env:APPVEYOR_BUILD_FOLDER\LibGit2Sharp\bin\Release\LibGit2Sharp.dll"
147-
Write-Host "LibGit2Sharp version = $([LibGit2Sharp.GlobalSettings]::Version)" -ForegroundColor "Magenta"
148-
149-
Get-ChildItem "$Env:APPVEYOR_BUILD_FOLDER\LibGit2sharp\*.nupkg" | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
150-
}
151-
152116
If ($Env:SHOULD_RUN_COVERALLS -eq $True -and $Env:publish_on_success -eq $True)
153117
{
154118
Write-Host "Uploading code coverage result..." -ForegroundColor "Green"
@@ -181,6 +145,10 @@ after_test:
181145
cat .\curl-out.txt
182146
}
183147
148+
artifacts:
149+
- path: '**\bin\**\*.nupkg'
150+
name: NuGet Package
151+
184152
notifications:
185153
- provider: Email
186154
to:

build.libgit2sharp.cmd

Lines changed: 0 additions & 35 deletions
This file was deleted.

version.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
3-
"version": "0.24.0"
3+
"version": "0.24.0",
4+
"publicReleaseRefSpec": [
5+
"^refs/heads/master$", // we release out of master
6+
"^refs/heads/v\\d+(?:\\.\\d+)?$" // we also release out of vNN branches
7+
],
8+
"cloudBuild": {
9+
"buildNumber": {
10+
"enabled": true
11+
}
12+
}
413
}

0 commit comments

Comments
 (0)