From f082f2eaeceb4e306b8cc5c20a1fbedaa289c7b8 Mon Sep 17 00:00:00 2001 From: Matthew John Cheetham Date: Fri, 12 Nov 2021 10:45:10 +0000 Subject: [PATCH 1/7] wsl: use wslview to launch browser in Windows from WSL When installed inside of a Linux environment we typically look for a set of utilities to open the user's preferred browser (xdg-open, gnome-open, kfmclient). However, if we are actually in a WSL (Windows Subsystem for Linux) distribution, these utilties may not be/are not present. Instead we can try and use the `wslview` utility that will launch the user's browser on the _Windows host_. Appending `wslview` to the list of utilities to open the browser means no behaviour change for existing Linux users, but for WSL distros we now have a chance to still open the browser. --- src/shared/Core/BrowserUtils.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/shared/Core/BrowserUtils.cs b/src/shared/Core/BrowserUtils.cs index 06d3be682..0df5dec51 100644 --- a/src/shared/Core/BrowserUtils.cs +++ b/src/shared/Core/BrowserUtils.cs @@ -39,7 +39,11 @@ public static void OpenDefaultBrowser(IEnvironment environment, Uri uri) // // We try and use the same 'shell execute' utilities as the Framework does, // searching for them in the same order until we find one. - foreach (string shellExec in new[] {"xdg-open", "gnome-open", "kfmclient"}) + // + // One additional 'shell execute' utility we also attempt to use is `wslview` + // that is commonly found on WSL (Windows Subsystem for Linux) distributions that + // opens the browser on the Windows host. + foreach (string shellExec in new[] {"xdg-open", "gnome-open", "kfmclient", "wslview"}) { if (environment.TryLocateExecutable(shellExec, out string shellExecPath)) { From 179cd3b8036ce6e3c072e677cbf7e797c4c136bf Mon Sep 17 00:00:00 2001 From: Matthew John Cheetham Date: Mon, 15 Nov 2021 14:24:07 +0000 Subject: [PATCH 2/7] cmdline: update System.CommandLine to 2.0.0-beta1.21216.1 Update the System.CommandLine package to 2.0.0-beta1.21216.1 to hopefully fix some problems with dotnet-suggest registration caused by Process::UseShellExecute differences between .NET Framework and .NET (Core). https://github.com/jonsequitur/command-line-api/commit/ad22b69ac8944fe29fd3433c4072828f3398d5af https://github.com/dotnet/command-line-api/issues/1254 https://github.com/microsoft/Git-Credential-Manager-Core/issues/505 --- src/shared/Core.UI/HelperApplication.cs | 2 +- src/shared/Core/Application.cs | 2 +- src/shared/Core/Core.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shared/Core.UI/HelperApplication.cs b/src/shared/Core.UI/HelperApplication.cs index e73916398..f5504e79c 100644 --- a/src/shared/Core.UI/HelperApplication.cs +++ b/src/shared/Core.UI/HelperApplication.cs @@ -49,7 +49,7 @@ private void OnException(Exception ex, InvocationContext invocationContext) WriteException(ex); } - invocationContext.ResultCode = -1; + invocationContext.ExitCode = -1; } private bool WriteException(Exception ex) diff --git a/src/shared/Core/Application.cs b/src/shared/Core/Application.cs index 92e0db0a2..a52cbef61 100644 --- a/src/shared/Core/Application.cs +++ b/src/shared/Core/Application.cs @@ -128,7 +128,7 @@ private void OnException(Exception ex, InvocationContext invocationContext) WriteException(ex); } - invocationContext.ResultCode = -1; + invocationContext.ExitCode = -1; } private bool WriteException(Exception ex) diff --git a/src/shared/Core/Core.csproj b/src/shared/Core/Core.csproj index 771cff50e..74b75b713 100644 --- a/src/shared/Core/Core.csproj +++ b/src/shared/Core/Core.csproj @@ -20,7 +20,7 @@ - + From 1136ad70c9f9373c9fb54153c7790116db63ea1d Mon Sep 17 00:00:00 2001 From: Lessley Dennington Date: Mon, 15 Nov 2021 10:37:00 -0800 Subject: [PATCH 3/7] README: add information on removal from MSFT Ubuntu feeds As part of the migration of GCM out of the microsoft org, we removed packages from the Microsoft Hirsute/Bionic feeds. Adding a note to the README informing users that these packages are no longer available and that installing the debian package from the releases page is the preferred mode at this time. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 221cf7de6..7252cc17f 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,10 @@ Download the latest [.deb package](https://github.com/microsoft/Git-Credential-M sudo dpkg -i git-credential-manager-core configure ``` +__Note:__ Although packages were previously offered on certain +[Microsoft Ubuntu package feeds](https://packages.microsoft.com/repos/), +GCM no longer publishes to these repositories. Please install the +Debian package using the above instructions instead. #### Other distributions From 210ef1c154da400bc7f3deb68afac7a05b4a63a7 Mon Sep 17 00:00:00 2001 From: Matthew John Cheetham Date: Mon, 15 Nov 2021 15:17:06 +0000 Subject: [PATCH 4/7] build: use new Microbuild 1ES pool Use the new Microbuild pool from 1ES. --- .azure-pipelines/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/release.yml b/.azure-pipelines/release.yml index 1047e1198..934942932 100644 --- a/.azure-pipelines/release.yml +++ b/.azure-pipelines/release.yml @@ -3,7 +3,7 @@ trigger: variables: configuration: Release - signPool: VSEng-MicroBuildVS2019 + signPool: MSEngSS-MicroBuild2019-1ES winImage: vs2017-win2016 osxImage: macos-latest From 1dc07b3e1c0a7bee90c737a2658116969f3a2d91 Mon Sep 17 00:00:00 2001 From: Matthew John Cheetham Date: Mon, 15 Nov 2021 15:34:17 +0000 Subject: [PATCH 5/7] build: use new Microbuild package --- src/osx/SignFiles.Mac/SignFiles.Mac.csproj | 2 +- src/windows/Installer.Windows/Installer.Windows.csproj | 2 +- src/windows/Payload.Windows/Payload.Windows.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osx/SignFiles.Mac/SignFiles.Mac.csproj b/src/osx/SignFiles.Mac/SignFiles.Mac.csproj index 0b7f86131..437ebc4ba 100644 --- a/src/osx/SignFiles.Mac/SignFiles.Mac.csproj +++ b/src/osx/SignFiles.Mac/SignFiles.Mac.csproj @@ -12,7 +12,7 @@ - + all diff --git a/src/windows/Installer.Windows/Installer.Windows.csproj b/src/windows/Installer.Windows/Installer.Windows.csproj index d5292d842..142396b88 100644 --- a/src/windows/Installer.Windows/Installer.Windows.csproj +++ b/src/windows/Installer.Windows/Installer.Windows.csproj @@ -19,7 +19,7 @@ - + all diff --git a/src/windows/Payload.Windows/Payload.Windows.csproj b/src/windows/Payload.Windows/Payload.Windows.csproj index e8f33e5b0..50e9d5d48 100644 --- a/src/windows/Payload.Windows/Payload.Windows.csproj +++ b/src/windows/Payload.Windows/Payload.Windows.csproj @@ -15,7 +15,7 @@ - + all From 4e2679fe0173aaeaf13ce03d68f2ca90b1c3d984 Mon Sep 17 00:00:00 2001 From: Matthew John Cheetham Date: Mon, 15 Nov 2021 15:55:26 +0000 Subject: [PATCH 6/7] build: use new Microbuild signing tasks --- .../templates/osx/pack.signed/step2-signpayload.yml | 2 +- .azure-pipelines/templates/osx/pack.signed/step4-signpack.yml | 2 +- .azure-pipelines/templates/windows/compile.signed.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/templates/osx/pack.signed/step2-signpayload.yml b/.azure-pipelines/templates/osx/pack.signed/step2-signpayload.yml index f4adce200..40da5395d 100644 --- a/.azure-pipelines/templates/osx/pack.signed/step2-signpayload.yml +++ b/.azure-pipelines/templates/osx/pack.signed/step2-signpayload.yml @@ -1,5 +1,5 @@ steps: - - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@2 + - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@3 displayName: Install signing plugin inputs: signType: '$(SignType)' diff --git a/.azure-pipelines/templates/osx/pack.signed/step4-signpack.yml b/.azure-pipelines/templates/osx/pack.signed/step4-signpack.yml index 115339ce8..db2adb334 100644 --- a/.azure-pipelines/templates/osx/pack.signed/step4-signpack.yml +++ b/.azure-pipelines/templates/osx/pack.signed/step4-signpack.yml @@ -1,5 +1,5 @@ steps: - - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@2 + - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@3 displayName: Install signing plugin inputs: signType: '$(SignType)' diff --git a/.azure-pipelines/templates/windows/compile.signed.yml b/.azure-pipelines/templates/windows/compile.signed.yml index 784d6b166..b75c620f1 100644 --- a/.azure-pipelines/templates/windows/compile.signed.yml +++ b/.azure-pipelines/templates/windows/compile.signed.yml @@ -1,5 +1,5 @@ steps: - - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@2 + - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@3 displayName: Install signing plugin condition: and(succeeded(), eq(variables['SignType'], 'real')) inputs: From 5ab84ddbcc3c9e7d78a45755d8d1eeab782613fb Mon Sep 17 00:00:00 2001 From: Matthew John Cheetham Date: Tue, 16 Nov 2021 10:13:12 +0000 Subject: [PATCH 7/7] build: authenticate to MicroBuild feeds --- .../templates/osx/pack.signed/step2-signpayload.yml | 5 +++++ .../templates/osx/pack.signed/step4-signpack.yml | 5 +++++ .azure-pipelines/templates/windows/compile.signed.yml | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/.azure-pipelines/templates/osx/pack.signed/step2-signpayload.yml b/.azure-pipelines/templates/osx/pack.signed/step2-signpayload.yml index 40da5395d..68bc5efbf 100644 --- a/.azure-pipelines/templates/osx/pack.signed/step2-signpayload.yml +++ b/.azure-pipelines/templates/osx/pack.signed/step2-signpayload.yml @@ -1,4 +1,9 @@ steps: + - task: NuGetAuthenticate@0 + displayName: Authenticate to MicroBuild NuGet feed + inputs: + nuGetServiceConnections: 'MicroBuild Toolset Nuget Feed (Read)' + - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@3 displayName: Install signing plugin inputs: diff --git a/.azure-pipelines/templates/osx/pack.signed/step4-signpack.yml b/.azure-pipelines/templates/osx/pack.signed/step4-signpack.yml index db2adb334..0a7e05d6d 100644 --- a/.azure-pipelines/templates/osx/pack.signed/step4-signpack.yml +++ b/.azure-pipelines/templates/osx/pack.signed/step4-signpack.yml @@ -1,4 +1,9 @@ steps: + - task: NuGetAuthenticate@0 + displayName: Authenticate to MicroBuild NuGet feed + inputs: + nuGetServiceConnections: 'MicroBuild Toolset Nuget Feed (Read)' + - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@3 displayName: Install signing plugin inputs: diff --git a/.azure-pipelines/templates/windows/compile.signed.yml b/.azure-pipelines/templates/windows/compile.signed.yml index b75c620f1..792d68870 100644 --- a/.azure-pipelines/templates/windows/compile.signed.yml +++ b/.azure-pipelines/templates/windows/compile.signed.yml @@ -1,4 +1,9 @@ steps: + - task: NuGetAuthenticate@0 + displayName: Authenticate to MicroBuild NuGet feed + inputs: + nuGetServiceConnections: 'MicroBuild Toolset Nuget Feed (Read)' + - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@3 displayName: Install signing plugin condition: and(succeeded(), eq(variables['SignType'], 'real'))