Skip to content

Commit 29217cf

Browse files
committed
Merge remote-tracking branch 'origin/master' into release/3.0
2 parents 7719238 + daaf7af commit 29217cf

File tree

155 files changed

+331
-902
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+331
-902
lines changed

Directory.Build.props

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<Project>
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0-windows</TargetFramework>
4+
<TargetFramework>net8.0-windows</TargetFramework>
55
<LangVersion>latest</LangVersion>
66
<NoWarn>$(NoWarn);1573;1591;1712</NoWarn>
77
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
8+
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
9+
<PackageManagerUIRuntimeIdentifier>win-x86</PackageManagerUIRuntimeIdentifier>
810
</PropertyGroup>
911

1012
<PropertyGroup>
@@ -19,4 +21,15 @@
1921
<PackageVersion>0.0.0.1</PackageVersion>
2022
</PropertyGroup>
2123

24+
<!-- Repo layout -->
25+
<PropertyGroup>
26+
<RepoRoot Condition="'$(RepoRoot)' == ''">$([MSBuild]::NormalizeDirectory('$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'appveyor.yml'))'))</RepoRoot>
27+
28+
<ArtifactsDir Condition="'$(ArtifactsDir)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts', '$(Configuration)'))</ArtifactsDir>
29+
<ArtifactsObjDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'obj'))</ArtifactsObjDir>
30+
<ArtifactsBinDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin'))</ArtifactsBinDir>
31+
<ArtifactsTestResultsDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'TestResults'))</ArtifactsTestResultsDir>
32+
<ArtifactsTmpDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'tmp'))</ArtifactsTmpDir>
33+
</PropertyGroup>
34+
2235
</Project>

Directory.Build.targets

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
<Project>
22

3-
<Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.1.3" />
4-
53
</Project>

Directory.Packages.props

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<PropertyGroup>
5+
<!-- To support GitExtensions.Extensibility 0.3.*, see https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu1011 -->
6+
<CentralPackageFloatingVersionsEnabled>true</CentralPackageFloatingVersionsEnabled>
7+
</PropertyGroup>
8+
9+
<!-- Solution dependencies -->
10+
<ItemGroup>
11+
<PackageVersion Include="Microsoft.VisualStudio.Composition" Version="17.2.41" />
12+
<PackageVersion Include="GitExtensions.Extensibility" Version="0.3.*" />
13+
<PackageVersion Include="Neptuo" Version="6.0.2" />
14+
<PackageVersion Include="Neptuo.Exceptions" Version="1.2.2" />
15+
<PackageVersion Include="Neptuo.Observables" Version="2.1.1" />
16+
<PackageVersion Include="NuGet.PackageManagement" Version="6.8.0" />
17+
<PackageVersion Include="System.Resources.Extensions" Version="8.0.0" />
18+
</ItemGroup>
19+
20+
<!-- Test-related -->
21+
<ItemGroup>
22+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
23+
<PackageVersion Include="Moq" Version="4.18.2" />
24+
<PackageVersion Include="MSTest.TestAdapter" Version="2.2.10" />
25+
<PackageVersion Include="MSTest.TestFramework" Version="2.2.10" />
26+
<PackageVersion Include="Appveyor.TestLogger" Version="2.0.0" />
27+
</ItemGroup>
28+
29+
</Project>

GitExtensions.PluginManager.sln

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00
44
VisualStudioVersion = 17.5.33130.490
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitExtensions.PluginManager", "src\GitExtensions.PluginManager\GitExtensions.PluginManager.csproj", "{4EB0566E-6D4F-43AF-AA97-2A15ABB66787}"
7+
ProjectSection(ProjectDependencies) = postProject
8+
{3B5E3720-B3CB-4A12-B2D4-6BCB6BE78FF1} = {3B5E3720-B3CB-4A12-B2D4-6BCB6BE78FF1}
9+
{B302D166-37CE-439D-8AE1-0CCB80BAD332} = {B302D166-37CE-439D-8AE1-0CCB80BAD332}
10+
{E7AD4376-D8B1-469D-A2E3-38059A5EB152} = {E7AD4376-D8B1-469D-A2E3-38059A5EB152}
11+
EndProjectSection
712
EndProject
813
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PackageManager.UI", "src\PackageManager.UI\PackageManager.UI.csproj", "{6F4FA02A-B061-4607-925E-27B122DE60BC}"
914
EndProject
@@ -30,8 +35,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
3035
appveyor.yml = appveyor.yml
3136
Directory.Build.props = Directory.Build.props
3237
Directory.Build.targets = Directory.Build.targets
38+
Directory.Packages.props = Directory.Packages.props
3339
GitExtensions.settings = GitExtensions.settings
34-
Packages.props = Packages.props
3540
README.md = README.md
3641
EndProjectSection
3742
EndProject

Packages.props

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

appveyor.yml

Lines changed: 70 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,31 @@
1-
#---------------------------------#
2-
# general configuration #
3-
#---------------------------------#
4-
51
# version format
6-
version: 2.0.1.{build}
2+
version: 3.0.0.{build}
3+
4+
matrix:
5+
fast_finish: true
6+
7+
# Build worker image (VM template)
8+
image:
9+
- Visual Studio 2022
710

811
# version suffix, if any (e.g. '-RC1', '-beta' otherwise '')
912
environment:
1013
version_suffix: ''
14+
# Disable the .NET logo in the console output.
15+
DOTNET_NOLOGO: true
16+
# Disable the .NET first time experience to skip caching NuGet packages and speed up the build.
17+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
1118

1219
# Do not build on tags (GitHub and BitBucket)
1320
skip_tags: true
1421

15-
#---------------------------------#
16-
# environment configuration #
17-
#---------------------------------#
18-
19-
# Build worker image (VM template)
20-
image:
21-
- Visual Studio 2022
22+
# Build settings, not to be confused with "before_build" and "after_build".
23+
# "project" is relative to the original build directory and not influenced by directory changes in "before_build".
24+
build:
25+
# enable MSBuild parallel builds
26+
parallel: true
27+
# MSBuild verbosity level
28+
verbosity: minimal
2229

2330
# enable patching of Directory.Build.props
2431
dotnet_csproj:
@@ -34,31 +41,51 @@ dotnet_csproj:
3441
# build configuration #
3542
#---------------------------------#
3643

44+
install:
45+
- ps: |
46+
# Install the required .NET SDK
47+
Invoke-WebRequest "https://dot.net/v1/dotnet-install.ps1" -OutFile "./dotnet-install.ps1"
48+
./dotnet-install.ps1 -Channel LTS -InstallDir 'C:\Program Files\dotnet'
49+
# Remove the script so it doesn't "pollute" the build
50+
Remove-Item -Path .\dotnet-install.ps1
51+
3752
build_script:
38-
- ps: .\tools\Prepare-Release.ps1
53+
- ps: |
54+
dotnet restore --verbosity q --nologo /bl:.\artifacts\logs\restore.binlog
55+
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
56+
57+
- ps: |
58+
dotnet build -c Release --verbosity q --nologo /bl:.\artifacts\logs\build.binlog
59+
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
60+
61+
- ps: |
62+
dotnet publish --configuration Release --verbosity q -bl:.\artifacts\logs\publish.binlog
63+
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
3964
4065
#---------------------------------#
4166
# tests configuration #
4267
#---------------------------------#
4368

4469
test_script:
45-
- ps: .\tools\Run-Tests.ps1
70+
- ps: |
71+
dotnet test -c Release --no-restore --no-build --nologo --verbosity q --test-adapter-path:. --logger:Appveyor --logger:trx /bl:.\artifacts\logs\tests.binlog
72+
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
4673
4774
after_test:
4875
- ps: |
4976
# do not sign artifacts for PR to release branches, publish dev builds instead
5077
if ($env:APPVEYOR_PULL_REQUEST_TITLE) {
5178
Write-Host "[INFO]: Do not sign artifacts from PR to release branch"
52-
Get-ChildItem GitExtensions.PluginManager*.nupkg | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
53-
Get-ChildItem GitExtensions.PluginManager*.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
79+
Get-ChildItem .\artifacts\GitExtensions.PluginManager*.nupkg | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
80+
Get-ChildItem .\artifacts\GitExtensions.PluginManager*.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
5481
Exit-AppVeyorBuild
5582
return
5683
}
5784
else {
5885
Write-Host "[INFO]: Prepare combined artifact for signing on release branch"
5986
Write-Host "Creating combined build artifact ..."
60-
$nupkg = (Resolve-Path .\GitExtensions.PluginManager*.nupkg)[0].Path;
61-
$zip = (Resolve-Path .\GitExtensions.PluginManager*.zip)[0].Path;
87+
$nupkg = (Resolve-Path .\artifacts\GitExtensions.PluginManager*.nupkg)[0].Path;
88+
$zip = (Resolve-Path .\artifacts\GitExtensions.PluginManager*.zip)[0].Path;
6289
$combined = ".\GitExtensions.PluginManager.$($env:APPVEYOR_BUILD_VERSION)$($env:version_suffix).combined-unsigned.zip"
6390
Compress-Archive -LiteralPath $nupkg, $zip -CompressionLevel NoCompression -DestinationPath $combined -Force
6491
}
@@ -69,9 +96,12 @@ after_test:
6996

7097
artifacts:
7198
- path: .\GitExtensions.PluginManager.*.combined-unsigned.zip
99+
- path: .\artifacts\logs\*.binlog
100+
101+
72102

73103
#---------------------------------#
74-
# deployment configuration #
104+
# artifacts deployment #
75105
#---------------------------------#
76106

77107
deploy:
@@ -85,3 +115,24 @@ deploy:
85115
method: POST
86116
authorization:
87117
secure: IlLI/MbhdzmXF/WB2G84zYsDWePXJqHBWDb1zBPxxXvGgx0WRxzMZxuBsvCOcZvbPTRF+UcGp0d5/HT8xZUEjA==
118+
119+
120+
# on build failure
121+
on_failure:
122+
- ps: |
123+
Get-ChildItem -recurse artifacts\Release\TestsResults\*.trx -ErrorAction SilentlyContinue `
124+
| ForEach-Object {
125+
Push-AppveyorArtifact "$_"
126+
}
127+
- ps: |
128+
Get-ChildItem -recurse artifacts\Release\TestsResults\*.trx | `
129+
ForEach-Object {
130+
$file = $_.FullName.Replace('[', '``[').Replace(']', '``]')
131+
#Write-Output "Processing $file"
132+
133+
[xml]$xml = Get-Content -Path $file
134+
$xml.TestRun.Results.UnitTestResult | Where-Object outcome -eq 'Failed' | ForEach-Object {
135+
$errorMessage = "$($_.Output.ErrorInfo.Message)`r`n$($_.Output.ErrorInfo.StackTrace)`r`n"
136+
Write-Host $errorMessage -ForegroundColor Red
137+
}
138+
}

src/GitExtensions.PluginManager/ArgsFix.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
6-
7-
namespace Neptuo
1+
namespace Neptuo
82
{
93
public interface ICloneable<T>
104
{
Lines changed: 11 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="$(MSBuildProjectDirectory)\Project.Publish.targets" />
23

34
<PropertyGroup>
45
<UseWindowsForms>true</UseWindowsForms>
6+
<UseWPF>true</UseWPF>
57
<Description>NuGet-based Plugin Manager for Git Extensions</Description>
68
<PackageTags>GitExtensions</PackageTags>
79
<PackageProjectUrl>https://github.com/gitextensions/gitextensions.pluginmanager</PackageProjectUrl>
810
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
911
<NuspecFile>$(MSBuildThisFileDirectory)$(MSBuildProjectName).nuspec</NuspecFile>
1012
<NoWarn>1701;1702;NU5100;NU5101;NU5103;NU5128</NoWarn>
11-
</PropertyGroup>
12-
13-
<PropertyGroup>
14-
<PackageManagerTargetPath>PackageManager\PackageManager.UI.exe</PackageManagerTargetPath>
15-
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
16-
<PackageManagerSourcePath>..\PackageManager.UI\bin\$(Configuration)\$(TargetFramework)\publish\PackageManager.UI.exe</PackageManagerSourcePath>
13+
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
1714
</PropertyGroup>
1815

1916
<ItemGroup>
2017
<PackageReference Include="GitExtensions.Extensibility" />
21-
<PackageReference Include="System.ComponentModel.Composition" />
18+
<PackageReference Include="Microsoft.VisualStudio.Composition" />
2219
<PackageReference Include="System.Resources.Extensions" />
2320
</ItemGroup>
2421

@@ -27,15 +24,16 @@
2724
</ItemGroup>
2825

2926
<ItemGroup>
30-
<Reference Include="GitUI">
31-
<HintPath>$(GitExtensionsPath)\GitUI.dll</HintPath>
27+
<None Include="GitExtensions.PluginManager.csproj.user" />
28+
</ItemGroup>
29+
30+
<ItemGroup>
31+
<Reference Include="GitExtensions.Extensibility">
32+
<HintPath>$(GitExtensionsPath)\GitExtensions.Extensibility.dll</HintPath>
3233
</Reference>
3334
<Reference Include="GitUIPluginInterfaces">
3435
<HintPath>$(GitExtensionsPath)\GitUIPluginInterfaces.dll</HintPath>
3536
</Reference>
36-
<Reference Include="ResourceManager">
37-
<HintPath>$(GitExtensionsPath)\ResourceManager.dll</HintPath>
38-
</Reference>
3937
</ItemGroup>
4038

4139
<ItemGroup>
@@ -53,38 +51,10 @@
5351
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
5452
</EmbeddedResource>
5553
</ItemGroup>
56-
57-
<Target Name="CopyPackageManager" AfterTargets="PostBuildEvent">
58-
<Copy SourceFiles="$(PackageManagerSourcePath)" DestinationFiles="$(TargetDir)$(PackageManagerTargetPath)" />
59-
<Copy SourceFiles="$(PackageManagerSourcePath)" DestinationFiles="$(GitExtensionsPluginsPath)\$(ProjectName)\$(PackageManagerTargetPath)" />
60-
</Target>
6154

6255
<Target Name="PreClean" BeforeTargets="Clean">
6356
<Message Text="Deleting PackageManager" Importance="high" />
6457
<Delete Files="$(TargetDir)$(PackageManagerTargetPath)" ContinueOnError="true" />
6558
</Target>
6659

67-
<Target Name="SetPackageProperties" BeforeTargets="GenerateNuspec">
68-
<PropertyGroup>
69-
<NuspecProperties>
70-
id=$(PackageId);
71-
version=$(PackageVersion);
72-
configuration=$(Configuration);
73-
tags=$(PackageTags.Replace(';',' '));
74-
projectUrl=$(PackageProjectUrl);
75-
iconUrl=$(PackageIconUrl);
76-
repositoryUrl=$(RepositoryUrl);
77-
repositoryType=$(RepositoryType);
78-
repositoryCommit=$(RepositoryCommit);
79-
author=$(Authors);
80-
copyright=$(Copyright);
81-
description=$(Description);
82-
targetDir=$(TargetDir);
83-
</NuspecProperties>
84-
</PropertyGroup>
85-
</Target>
86-
87-
<Target Name="Zip" AfterTargets="Pack">
88-
<Exec Command="powershell -ExecutionPolicy Unrestricted $(MSBuildProjectDirectory)\..\..\tools\Zip-GitExtensionsPlugin.ps1 -Version $(PackageVersion) -Configuration $(Configuration)" />
89-
</Target>
90-
</Project>
60+
</Project>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project>
22
<PropertyGroup>
33
<GitExtensionsDownloadPath>..\..\..\gitextensions.shared</GitExtensionsDownloadPath> <!-- path is relative to $(ProjectDir) -->
4-
<GitExtensionsReferenceVersion>v4.0.1</GitExtensionsReferenceVersion> <!-- 'latest' or 'v3.1' (= tag from GitHub releases) or 'v3.1.0.5877' (= build number from AppVeyor)-->
5-
<GitExtensionsReferenceSource>GitHub</GitExtensionsReferenceSource> <!-- 'GitHub' or 'AppVeyor' -->
4+
<GitExtensionsReferenceVersion>latest</GitExtensionsReferenceVersion> <!-- 'latest' or 'v3.1' (= tag from GitHub releases) or 'v3.1.0.5877' (= build number from AppVeyor)-->
5+
<GitExtensionsReferenceSource>AppVeyor</GitExtensionsReferenceSource> <!-- 'GitHub' or 'AppVeyor' -->
66
<GitExtensionsPath>$(GitExtensionsDownloadPath)</GitExtensionsPath> <!-- for local builds (no download) -->
77
</PropertyGroup>
88
</Project>

src/GitExtensions.PluginManager/GitExtensions.PluginManager.nuspec

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
</metadata>
1515
<files>
1616
<file src="../../LICENSE.md" target="/" />
17-
<file src="bin/$configuration$/net6.0-windows/GitExtensions.PluginManager.dll" target="lib/" />
18-
<file src="bin/$configuration$/net6.0-windows/PackageManager/PackageManager.UI.exe" target="lib/PackageManager/" />
19-
<file src="bin/$configuration$/net6.0-windows/PackageManager.UI.runtimeconfig.json" target="lib/PackageManager/" />
17+
<file src="bin/$configuration$/net8.0-windows/GitExtensions.PluginManager.dll" target="lib/" />
18+
<file src="bin/$configuration$/net8.0-windows/PackageManager/PackageManager.UI.exe" target="lib/PackageManager/" />
2019
</files>
2120
</package>

0 commit comments

Comments
 (0)