Skip to content

Commit

Permalink
Bump GCM to latest stable v2.0.785
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Nov 17, 2022
1 parent 60cda1c commit 35b90f9
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 36 deletions.
7 changes: 3 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[submodule "gcm"]
path = gcm
url = https://github.com/microsoft/Git-Credential-Manager-Core
branch = master
[submodule "external/gcm"]
path = external/gcm
url = https://github.com/GitCredentialManager/git-credential-manager
3 changes: 3 additions & 0 deletions external/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ignore submodule
[**]
generated_code = true
1 change: 1 addition & 0 deletions external/gcm
Submodule gcm added at cf5a69
1 change: 0 additions & 1 deletion gcm
Submodule gcm deleted from 39efe0
56 changes: 32 additions & 24 deletions gcm.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,22 @@ VisualStudioVersion = 17.0.31423.177
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "gcm", "src\gcm.csproj", "{1A422BD3-3F70-42E2-8440-BC5849D98C4F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitHub", "gcm\src\shared\GitHub\GitHub.csproj", "{C66EF899-8746-432B-9197-B46E8A24D766}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AzureRepos", "gcm\src\shared\Microsoft.AzureRepos\Microsoft.AzureRepos.csproj", "{7A4835F8-D262-44AC-9847-A7A9A795B3DB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Git.CredentialManager", "gcm\src\shared\Microsoft.Git.CredentialManager\Microsoft.Git.CredentialManager.csproj", "{49FAAEA6-11B1-4C94-BCCC-73ABC5081F82}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Atlassian.Bitbucket", "gcm\src\shared\Atlassian.Bitbucket\Atlassian.Bitbucket.csproj", "{176D8871-96AF-487E-95FF-F7C6019F9C2D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{41F74DE7-F58C-4F02-8D89-52851C4932F9}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
readme.md = readme.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core", "external\gcm\src\shared\Core\Core.csproj", "{007ECD8D-CA95-4E0E-A41B-2E5760F0C1D5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Atlassian.Bitbucket", "external\gcm\src\shared\Atlassian.Bitbucket\Atlassian.Bitbucket.csproj", "{17315697-B03C-4013-B509-EDBCC90C404E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitHub", "external\gcm\src\shared\GitHub\GitHub.csproj", "{A6D011E2-666F-4D0B-B340-9C4C9AEC391D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AzureRepos", "external\gcm\src\shared\Microsoft.AzureRepos\Microsoft.AzureRepos.csproj", "{6F00F0BF-8270-4173-B16F-DF1553A38294}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "external", "external", "{FA3F47A5-A381-4BD4-9329-B7C2E1A73CB3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -29,26 +31,32 @@ Global
{1A422BD3-3F70-42E2-8440-BC5849D98C4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A422BD3-3F70-42E2-8440-BC5849D98C4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A422BD3-3F70-42E2-8440-BC5849D98C4F}.Release|Any CPU.Build.0 = Release|Any CPU
{C66EF899-8746-432B-9197-B46E8A24D766}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C66EF899-8746-432B-9197-B46E8A24D766}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C66EF899-8746-432B-9197-B46E8A24D766}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C66EF899-8746-432B-9197-B46E8A24D766}.Release|Any CPU.Build.0 = Release|Any CPU
{7A4835F8-D262-44AC-9847-A7A9A795B3DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7A4835F8-D262-44AC-9847-A7A9A795B3DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7A4835F8-D262-44AC-9847-A7A9A795B3DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7A4835F8-D262-44AC-9847-A7A9A795B3DB}.Release|Any CPU.Build.0 = Release|Any CPU
{49FAAEA6-11B1-4C94-BCCC-73ABC5081F82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{49FAAEA6-11B1-4C94-BCCC-73ABC5081F82}.Debug|Any CPU.Build.0 = Debug|Any CPU
{49FAAEA6-11B1-4C94-BCCC-73ABC5081F82}.Release|Any CPU.ActiveCfg = Release|Any CPU
{49FAAEA6-11B1-4C94-BCCC-73ABC5081F82}.Release|Any CPU.Build.0 = Release|Any CPU
{176D8871-96AF-487E-95FF-F7C6019F9C2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{176D8871-96AF-487E-95FF-F7C6019F9C2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{176D8871-96AF-487E-95FF-F7C6019F9C2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{176D8871-96AF-487E-95FF-F7C6019F9C2D}.Release|Any CPU.Build.0 = Release|Any CPU
{007ECD8D-CA95-4E0E-A41B-2E5760F0C1D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{007ECD8D-CA95-4E0E-A41B-2E5760F0C1D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{007ECD8D-CA95-4E0E-A41B-2E5760F0C1D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{007ECD8D-CA95-4E0E-A41B-2E5760F0C1D5}.Release|Any CPU.Build.0 = Release|Any CPU
{17315697-B03C-4013-B509-EDBCC90C404E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17315697-B03C-4013-B509-EDBCC90C404E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{17315697-B03C-4013-B509-EDBCC90C404E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{17315697-B03C-4013-B509-EDBCC90C404E}.Release|Any CPU.Build.0 = Release|Any CPU
{A6D011E2-666F-4D0B-B340-9C4C9AEC391D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A6D011E2-666F-4D0B-B340-9C4C9AEC391D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A6D011E2-666F-4D0B-B340-9C4C9AEC391D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A6D011E2-666F-4D0B-B340-9C4C9AEC391D}.Release|Any CPU.Build.0 = Release|Any CPU
{6F00F0BF-8270-4173-B16F-DF1553A38294}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6F00F0BF-8270-4173-B16F-DF1553A38294}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6F00F0BF-8270-4173-B16F-DF1553A38294}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6F00F0BF-8270-4173-B16F-DF1553A38294}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{007ECD8D-CA95-4E0E-A41B-2E5760F0C1D5} = {FA3F47A5-A381-4BD4-9329-B7C2E1A73CB3}
{17315697-B03C-4013-B509-EDBCC90C404E} = {FA3F47A5-A381-4BD4-9329-B7C2E1A73CB3}
{A6D011E2-666F-4D0B-B340-9C4C9AEC391D} = {FA3F47A5-A381-4BD4-9329-B7C2E1A73CB3}
{6F00F0BF-8270-4173-B16F-DF1553A38294} = {FA3F47A5-A381-4BD4-9329-B7C2E1A73CB3}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5B7BEADD-4352-4C67-A70E-60FEC09478AF}
EndGlobalSection
Expand Down
37 changes: 37 additions & 0 deletions src/ApplicationBase.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using System;
using System.IO;
using System.Reflection;

namespace DotNet;

static class ApplicationBase
{
public static string GetEntryApplicationPath()
{
#if NETFRAMEWORK
// Single file publishing does not exist with .NET Framework so
// we can just use reflection to get the entry assembly path.
return Assembly.GetEntryAssembly().Location;
#else
// Assembly::Location always returns an empty string if the application
// was published as a single file
#pragma warning disable IL3000
bool isSingleFile = string.IsNullOrEmpty(Assembly.GetEntryAssembly()?.Location);
#pragma warning restore IL3000

// Use "argv[0]" to get the full path to the entry executable in
// .NET 5+ when published as a single file.
string[] args = Environment.GetCommandLineArgs();
string candidatePath = args[0];

// If we have not been published as a single file then we must strip the
// ".dll" file extension to get the default AppHost/SuperHost name.
if (!isSingleFile && Path.HasExtension(candidatePath))
{
return Path.ChangeExtension(candidatePath, null);
}

return candidatePath;
#endif
}
}
5 changes: 3 additions & 2 deletions src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
using System.Reflection;
using System.Threading.Tasks;
using Atlassian.Bitbucket;
using GitCredentialManager;
using GitHub;
using Microsoft.AzureRepos;
using Microsoft.Git.CredentialManager;

namespace gcm
{
Expand All @@ -25,7 +25,8 @@ static Program()
Environment.SetEnvironmentVariable("GCM_INTERACTIVE", "never", EnvironmentVariableTarget.Process);
Environment.SetEnvironmentVariable("GIT_TERMINAL_PROMPT", "false", EnvironmentVariableTarget.Process);

var context = new CommandContext(GetApplicationPath());
var appPath = ApplicationBase.GetEntryApplicationPath();
var context = new CommandContext(appPath);
providers = new IHostProvider[]
{
new GitHubHostProvider(context),
Expand Down
10 changes: 5 additions & 5 deletions src/gcm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Description>A dotnet global tool for managing Git credentials using the Microsoft Git Credentials Manager Core.</Description>

<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
<TargetFramework>net6.0</TargetFramework>

<AssemblyName>gcm</AssemblyName>
<RootNamespace>DotNet</RootNamespace>
Expand All @@ -28,10 +28,10 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\gcm\src\shared\Atlassian.Bitbucket\Atlassian.Bitbucket.csproj" />
<ProjectReference Include="..\gcm\src\shared\GitHub\GitHub.csproj" />
<ProjectReference Include="..\gcm\src\shared\Microsoft.AzureRepos\Microsoft.AzureRepos.csproj" />
<ProjectReference Include="..\gcm\src\shared\Microsoft.Git.CredentialManager\Microsoft.Git.CredentialManager.csproj" />
<ProjectReference Include="..\external\gcm\src\shared\Atlassian.Bitbucket\Atlassian.Bitbucket.csproj" />
<ProjectReference Include="..\external\gcm\src\shared\GitHub\GitHub.csproj" />
<ProjectReference Include="..\external\gcm\src\shared\Microsoft.AzureRepos\Microsoft.AzureRepos.csproj" />
<ProjectReference Include="..\external\gcm\src\shared\Core\Core.csproj" />
</ItemGroup>

</Project>

0 comments on commit 35b90f9

Please sign in to comment.