Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support GitExtensions 4.0.1 and upgrade to .NET6 (#55) #56

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<PropertyGroup>
<UseWindowsForms>true</UseWindowsForms>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<VersionPrefix>2.0.1</VersionPrefix>
<TargetFramework>net6.0-windows7.0</TargetFramework>
<VersionPrefix>2.0.2</VersionPrefix>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.1" />
<PackageReference Include="coverlet.collector" Version="3.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#---------------------------------#

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

# version suffix, if any (e.g. '-RC1', '-beta' otherwise '')
environment:
Expand All @@ -17,7 +17,7 @@ nuget:
disable_publish_on_pr: true

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

# enable patching of Directory.Build.props
dotnet_csproj:
Expand Down
16 changes: 5 additions & 11 deletions src/GitExtensions.GerritPlugin/GerritUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using GitCommands;
using GitExtUtils;
using GitUI;
using GitUI.Infrastructure;
using GitUIPluginInterfaces;
using JetBrains.Annotations;

Expand Down Expand Up @@ -79,7 +80,7 @@ public static Uri GetFetchUrl(IGitModule module, string remote)

StartAgent(owner, module, remote);

var sshCmd = GitSshHelpers.Plink()
var sshCmd = GitSshHelpers.IsPlink
? AppSettings.Plink
: SshPathLocatorInstance.GetSshFromGitDir(AppSettings.GitBinDir);

Expand All @@ -90,7 +91,7 @@ public static Uri GetFetchUrl(IGitModule module, string remote)

string hostname = fetchUrl.Host;
string username = fetchUrl.UserInfo;
string portFlag = GitSshHelpers.Plink() ? " -P " : " -p ";
string portFlag = GitSshHelpers.IsPlink ? " -P " : " -p ";
int port = fetchUrl.Port;

if (port == -1 && fetchUrl.Scheme == "ssh")
Expand Down Expand Up @@ -139,16 +140,9 @@ public static void StartAgent([NotNull] IWin32Window owner, [NotNull] IGitModule
throw new ArgumentNullException(nameof(remote));
}

if (GitSshHelpers.Plink())
if (GitSshHelpers.IsPlink)
{
if (!File.Exists(AppSettings.Pageant))
{
MessageBoxes.PAgentNotFound(owner);
}
else
{
module.StartPageantForRemote(remote);
}
PuttyHelpers.StartPageantIfConfigured(() => ((GitModule)module).GetPuttyKeyFileForRemote(remote));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0">
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1">
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Composition" Version="16.9.20">
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="16.10.56">
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="17.0.64">
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1">
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</PackageReference>
<PackageReference Include="NUnit" Version="3.13.2">
<PackageReference Include="NUnit" Version="3.13.3">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="GitExtensions.Extensibility" Version="0.2.*" />
<PackageReference Include="GitExtensions.Extensibility" Version="0.3.0.57" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
<group>
<dependency id="GitExtensions.Extensibility" version="[0.2.0, 0.3.0)" />
</group>
<!-- To fix Warning NU5128 Add a dependency group for net5.0-windows7.0 to the nuspec -->
<group targetFramework="net5.0-windows7.0">
<!-- To fix Warning NU5128 Add a dependency group for net6.0-windows7.0 to the nuspec -->
<group targetFramework="net6.0-windows7.0">
<dependency id="GitExtensions.Extensibility" version="[0.2.0, 0.3.0)" />
</group>
</dependencies>
</metadata>
<files>
<file src="..\..\LICENSE.md" target="\" />
<file src="bin\$configuration$\net5.0-windows7.0\GitExtensions.GerritPlugin.dll" target="\lib\" />
<file src="bin\$configuration$\net6.0-windows7.0\GitExtensions.GerritPlugin.dll" target="\lib\" />
<file src="Resources\IconGerrit.png" target="\Resources\" />
</files>
</package>