Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into release/3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RussKie committed Jul 31, 2024
2 parents 7719238 + daaf7af commit 29217cf
Show file tree
Hide file tree
Showing 155 changed files with 331 additions and 902 deletions.
15 changes: 14 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<Project>

<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<LangVersion>latest</LangVersion>
<NoWarn>$(NoWarn);1573;1591;1712</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
<PackageManagerUIRuntimeIdentifier>win-x86</PackageManagerUIRuntimeIdentifier>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -19,4 +21,15 @@
<PackageVersion>0.0.0.1</PackageVersion>
</PropertyGroup>

<!-- Repo layout -->
<PropertyGroup>
<RepoRoot Condition="'$(RepoRoot)' == ''">$([MSBuild]::NormalizeDirectory('$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'appveyor.yml'))'))</RepoRoot>

<ArtifactsDir Condition="'$(ArtifactsDir)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts', '$(Configuration)'))</ArtifactsDir>
<ArtifactsObjDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'obj'))</ArtifactsObjDir>
<ArtifactsBinDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin'))</ArtifactsBinDir>
<ArtifactsTestResultsDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'TestResults'))</ArtifactsTestResultsDir>
<ArtifactsTmpDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'tmp'))</ArtifactsTmpDir>
</PropertyGroup>

</Project>
2 changes: 0 additions & 2 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<Project>

<Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.1.3" />

</Project>
29 changes: 29 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<!-- To support GitExtensions.Extensibility 0.3.*, see https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu1011 -->
<CentralPackageFloatingVersionsEnabled>true</CentralPackageFloatingVersionsEnabled>
</PropertyGroup>

<!-- Solution dependencies -->
<ItemGroup>
<PackageVersion Include="Microsoft.VisualStudio.Composition" Version="17.2.41" />
<PackageVersion Include="GitExtensions.Extensibility" Version="0.3.*" />
<PackageVersion Include="Neptuo" Version="6.0.2" />
<PackageVersion Include="Neptuo.Exceptions" Version="1.2.2" />
<PackageVersion Include="Neptuo.Observables" Version="2.1.1" />
<PackageVersion Include="NuGet.PackageManagement" Version="6.8.0" />
<PackageVersion Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>

<!-- Test-related -->
<ItemGroup>
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageVersion Include="Moq" Version="4.18.2" />
<PackageVersion Include="MSTest.TestAdapter" Version="2.2.10" />
<PackageVersion Include="MSTest.TestFramework" Version="2.2.10" />
<PackageVersion Include="Appveyor.TestLogger" Version="2.0.0" />
</ItemGroup>

</Project>
7 changes: 6 additions & 1 deletion GitExtensions.PluginManager.sln
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 17.5.33130.490
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitExtensions.PluginManager", "src\GitExtensions.PluginManager\GitExtensions.PluginManager.csproj", "{4EB0566E-6D4F-43AF-AA97-2A15ABB66787}"
ProjectSection(ProjectDependencies) = postProject
{3B5E3720-B3CB-4A12-B2D4-6BCB6BE78FF1} = {3B5E3720-B3CB-4A12-B2D4-6BCB6BE78FF1}
{B302D166-37CE-439D-8AE1-0CCB80BAD332} = {B302D166-37CE-439D-8AE1-0CCB80BAD332}
{E7AD4376-D8B1-469D-A2E3-38059A5EB152} = {E7AD4376-D8B1-469D-A2E3-38059A5EB152}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PackageManager.UI", "src\PackageManager.UI\PackageManager.UI.csproj", "{6F4FA02A-B061-4607-925E-27B122DE60BC}"
EndProject
Expand All @@ -30,8 +35,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
appveyor.yml = appveyor.yml
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
Directory.Packages.props = Directory.Packages.props
GitExtensions.settings = GitExtensions.settings
Packages.props = Packages.props
README.md = README.md
EndProjectSection
EndProject
Expand Down
22 changes: 0 additions & 22 deletions Packages.props

This file was deleted.

89 changes: 70 additions & 19 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
#---------------------------------#
# general configuration #
#---------------------------------#

# version format
version: 2.0.1.{build}
version: 3.0.0.{build}

matrix:
fast_finish: true

# Build worker image (VM template)
image:
- Visual Studio 2022

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

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

#---------------------------------#
# environment configuration #
#---------------------------------#

# Build worker image (VM template)
image:
- Visual Studio 2022
# Build settings, not to be confused with "before_build" and "after_build".
# "project" is relative to the original build directory and not influenced by directory changes in "before_build".
build:
# enable MSBuild parallel builds
parallel: true
# MSBuild verbosity level
verbosity: minimal

# enable patching of Directory.Build.props
dotnet_csproj:
Expand All @@ -34,31 +41,51 @@ dotnet_csproj:
# build configuration #
#---------------------------------#

install:
- ps: |
# Install the required .NET SDK
Invoke-WebRequest "https://dot.net/v1/dotnet-install.ps1" -OutFile "./dotnet-install.ps1"
./dotnet-install.ps1 -Channel LTS -InstallDir 'C:\Program Files\dotnet'
# Remove the script so it doesn't "pollute" the build
Remove-Item -Path .\dotnet-install.ps1
build_script:
- ps: .\tools\Prepare-Release.ps1
- ps: |
dotnet restore --verbosity q --nologo /bl:.\artifacts\logs\restore.binlog
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
- ps: |
dotnet build -c Release --verbosity q --nologo /bl:.\artifacts\logs\build.binlog
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
- ps: |
dotnet publish --configuration Release --verbosity q -bl:.\artifacts\logs\publish.binlog
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
#---------------------------------#
# tests configuration #
#---------------------------------#

test_script:
- ps: .\tools\Run-Tests.ps1
- ps: |
dotnet test -c Release --no-restore --no-build --nologo --verbosity q --test-adapter-path:. --logger:Appveyor --logger:trx /bl:.\artifacts\logs\tests.binlog
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
after_test:
- ps: |
# do not sign artifacts for PR to release branches, publish dev builds instead
if ($env:APPVEYOR_PULL_REQUEST_TITLE) {
Write-Host "[INFO]: Do not sign artifacts from PR to release branch"
Get-ChildItem GitExtensions.PluginManager*.nupkg | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
Get-ChildItem GitExtensions.PluginManager*.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
Get-ChildItem .\artifacts\GitExtensions.PluginManager*.nupkg | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
Get-ChildItem .\artifacts\GitExtensions.PluginManager*.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
Exit-AppVeyorBuild
return
}
else {
Write-Host "[INFO]: Prepare combined artifact for signing on release branch"
Write-Host "Creating combined build artifact ..."
$nupkg = (Resolve-Path .\GitExtensions.PluginManager*.nupkg)[0].Path;
$zip = (Resolve-Path .\GitExtensions.PluginManager*.zip)[0].Path;
$nupkg = (Resolve-Path .\artifacts\GitExtensions.PluginManager*.nupkg)[0].Path;
$zip = (Resolve-Path .\artifacts\GitExtensions.PluginManager*.zip)[0].Path;
$combined = ".\GitExtensions.PluginManager.$($env:APPVEYOR_BUILD_VERSION)$($env:version_suffix).combined-unsigned.zip"
Compress-Archive -LiteralPath $nupkg, $zip -CompressionLevel NoCompression -DestinationPath $combined -Force
}
Expand All @@ -69,9 +96,12 @@ after_test:

artifacts:
- path: .\GitExtensions.PluginManager.*.combined-unsigned.zip
- path: .\artifacts\logs\*.binlog



#---------------------------------#
# deployment configuration #
# artifacts deployment #
#---------------------------------#

deploy:
Expand All @@ -85,3 +115,24 @@ deploy:
method: POST
authorization:
secure: IlLI/MbhdzmXF/WB2G84zYsDWePXJqHBWDb1zBPxxXvGgx0WRxzMZxuBsvCOcZvbPTRF+UcGp0d5/HT8xZUEjA==


# on build failure
on_failure:
- ps: |
Get-ChildItem -recurse artifacts\Release\TestsResults\*.trx -ErrorAction SilentlyContinue `
| ForEach-Object {
Push-AppveyorArtifact "$_"
}
- ps: |
Get-ChildItem -recurse artifacts\Release\TestsResults\*.trx | `
ForEach-Object {
$file = $_.FullName.Replace('[', '``[').Replace(']', '``]')
#Write-Output "Processing $file"
[xml]$xml = Get-Content -Path $file
$xml.TestRun.Results.UnitTestResult | Where-Object outcome -eq 'Failed' | ForEach-Object {
$errorMessage = "$($_.Output.ErrorInfo.Message)`r`n$($_.Output.ErrorInfo.StackTrace)`r`n"
Write-Host $errorMessage -ForegroundColor Red
}
}
8 changes: 1 addition & 7 deletions src/GitExtensions.PluginManager/ArgsFix.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Neptuo
namespace Neptuo
{
public interface ICloneable<T>
{
Expand Down
52 changes: 11 additions & 41 deletions src/GitExtensions.PluginManager/GitExtensions.PluginManager.csproj
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(MSBuildProjectDirectory)\Project.Publish.targets" />

<PropertyGroup>
<UseWindowsForms>true</UseWindowsForms>
<UseWPF>true</UseWPF>
<Description>NuGet-based Plugin Manager for Git Extensions</Description>
<PackageTags>GitExtensions</PackageTags>
<PackageProjectUrl>https://github.com/gitextensions/gitextensions.pluginmanager</PackageProjectUrl>
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
<NuspecFile>$(MSBuildThisFileDirectory)$(MSBuildProjectName).nuspec</NuspecFile>
<NoWarn>1701;1702;NU5100;NU5101;NU5103;NU5128</NoWarn>
</PropertyGroup>

<PropertyGroup>
<PackageManagerTargetPath>PackageManager\PackageManager.UI.exe</PackageManagerTargetPath>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageManagerSourcePath>..\PackageManager.UI\bin\$(Configuration)\$(TargetFramework)\publish\PackageManager.UI.exe</PackageManagerSourcePath>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitExtensions.Extensibility" />
<PackageReference Include="System.ComponentModel.Composition" />
<PackageReference Include="Microsoft.VisualStudio.Composition" />
<PackageReference Include="System.Resources.Extensions" />
</ItemGroup>

Expand All @@ -27,15 +24,16 @@
</ItemGroup>

<ItemGroup>
<Reference Include="GitUI">
<HintPath>$(GitExtensionsPath)\GitUI.dll</HintPath>
<None Include="GitExtensions.PluginManager.csproj.user" />
</ItemGroup>

<ItemGroup>
<Reference Include="GitExtensions.Extensibility">
<HintPath>$(GitExtensionsPath)\GitExtensions.Extensibility.dll</HintPath>
</Reference>
<Reference Include="GitUIPluginInterfaces">
<HintPath>$(GitExtensionsPath)\GitUIPluginInterfaces.dll</HintPath>
</Reference>
<Reference Include="ResourceManager">
<HintPath>$(GitExtensionsPath)\ResourceManager.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
Expand All @@ -53,38 +51,10 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

<Target Name="CopyPackageManager" AfterTargets="PostBuildEvent">
<Copy SourceFiles="$(PackageManagerSourcePath)" DestinationFiles="$(TargetDir)$(PackageManagerTargetPath)" />
<Copy SourceFiles="$(PackageManagerSourcePath)" DestinationFiles="$(GitExtensionsPluginsPath)\$(ProjectName)\$(PackageManagerTargetPath)" />
</Target>

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

<Target Name="SetPackageProperties" BeforeTargets="GenerateNuspec">
<PropertyGroup>
<NuspecProperties>
id=$(PackageId);
version=$(PackageVersion);
configuration=$(Configuration);
tags=$(PackageTags.Replace(';',' '));
projectUrl=$(PackageProjectUrl);
iconUrl=$(PackageIconUrl);
repositoryUrl=$(RepositoryUrl);
repositoryType=$(RepositoryType);
repositoryCommit=$(RepositoryCommit);
author=$(Authors);
copyright=$(Copyright);
description=$(Description);
targetDir=$(TargetDir);
</NuspecProperties>
</PropertyGroup>
</Target>

<Target Name="Zip" AfterTargets="Pack">
<Exec Command="powershell -ExecutionPolicy Unrestricted $(MSBuildProjectDirectory)\..\..\tools\Zip-GitExtensionsPlugin.ps1 -Version $(PackageVersion) -Configuration $(Configuration)" />
</Target>
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project>
<PropertyGroup>
<GitExtensionsDownloadPath>..\..\..\gitextensions.shared</GitExtensionsDownloadPath> <!-- path is relative to $(ProjectDir) -->
<GitExtensionsReferenceVersion>v4.0.1</GitExtensionsReferenceVersion> <!-- 'latest' or 'v3.1' (= tag from GitHub releases) or 'v3.1.0.5877' (= build number from AppVeyor)-->
<GitExtensionsReferenceSource>GitHub</GitExtensionsReferenceSource> <!-- 'GitHub' or 'AppVeyor' -->
<GitExtensionsReferenceVersion>latest</GitExtensionsReferenceVersion> <!-- 'latest' or 'v3.1' (= tag from GitHub releases) or 'v3.1.0.5877' (= build number from AppVeyor)-->
<GitExtensionsReferenceSource>AppVeyor</GitExtensionsReferenceSource> <!-- 'GitHub' or 'AppVeyor' -->
<GitExtensionsPath>$(GitExtensionsDownloadPath)</GitExtensionsPath> <!-- for local builds (no download) -->
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
</metadata>
<files>
<file src="../../LICENSE.md" target="/" />
<file src="bin/$configuration$/net6.0-windows/GitExtensions.PluginManager.dll" target="lib/" />
<file src="bin/$configuration$/net6.0-windows/PackageManager/PackageManager.UI.exe" target="lib/PackageManager/" />
<file src="bin/$configuration$/net6.0-windows/PackageManager.UI.runtimeconfig.json" target="lib/PackageManager/" />
<file src="bin/$configuration$/net8.0-windows/GitExtensions.PluginManager.dll" target="lib/" />
<file src="bin/$configuration$/net8.0-windows/PackageManager/PackageManager.UI.exe" target="lib/PackageManager/" />
</files>
</package>
Loading

0 comments on commit 29217cf

Please sign in to comment.