Skip to content

Commit e1ebbe1

Browse files
authored
Merge pull request #109 from microsoft/fix-rel
Fix bugs in release pipeline
2 parents 296dc5e + 657d136 commit e1ebbe1

File tree

9 files changed

+62
-19
lines changed

9 files changed

+62
-19
lines changed

.azure-pipelines/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ trigger:
33

44
variables:
55
configuration: Release
6-
signPool: VSEng-MicroBuildVS2017
6+
signPool: VSEng-MicroBuildVS2019
77
winImage: vs2017-win2016
88
osxImage: macos-latest
99

@@ -13,7 +13,7 @@ jobs:
1313
pool:
1414
name: $(signPool)
1515
steps:
16-
- template: templates/windows/compile.yml
16+
- template: templates/windows/compile.signed.yml
1717
- template: templates/windows/pack.yml
1818

1919
- job: osx_step1

.azure-pipelines/templates/osx/pack.signed/step5-dist.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ steps:
2020
artifactName: 'tmp.macsymbols'
2121
downloadPath: '$(Build.StagingDirectory)/symbols'
2222

23-
- script: src/osx/SignFiles.Mac/notarize-pkg.sh -id "$(AppleId)" -p "$(AppleIdPassword)" -pkg "$(Build.StagingDirectory)"/pkg/*.pkg
24-
displayName: Notarize and staple installer package
23+
# Skip notarization until we can preserve the hardened runtime bit and sign the .NET Core runtime bits
24+
# Tracked: https://github.com/microsoft/Git-Credential-Manager-Core/issues/108
25+
#- script: src/osx/SignFiles.Mac/notarize-pkg.sh -id "$(AppleId)" -p "$(AppleIdPassword)" -pkg "$(Build.StagingDirectory)"/pkg/*.pkg
26+
# displayName: Notarize and staple installer package
2527

2628
- script: |
2729
mkdir -p "$(Build.StagingDirectory)/publish/payload" "$(Build.StagingDirectory)/publish/payload.sym"
@@ -39,19 +41,19 @@ steps:
3941
- task: ArchiveFiles@2
4042
displayName: Create payload archive
4143
inputs:
42-
rootFolderOrFile: '$(Build.StagingDirectory)\publish\payload\'
44+
rootFolderOrFile: '$(Build.StagingDirectory)/publish/payload/'
4345
includeRootFolder: false
4446
archiveType: 'tar'
45-
archiveFile: '$(Build.StagingDirectory)\publish\gcmcore-osx-$(GitBuildVersion).tar.gz'
47+
archiveFile: '$(Build.StagingDirectory)/publish/gcmcore-osx-$(GitBuildVersion).tar.gz'
4648
replaceExistingArchive: true
4749

4850
- task: ArchiveFiles@2
4951
displayName: Create symbol archive
5052
inputs:
51-
rootFolderOrFile: '$(Build.StagingDirectory)\publish\payload.sym\'
53+
rootFolderOrFile: '$(Build.StagingDirectory)/publish/payload.sym/'
5254
includeRootFolder: false
5355
archiveType: 'tar'
54-
archiveFile: '$(Build.StagingDirectory)\publish\symbols-osx.tar.gz'
56+
archiveFile: '$(Build.StagingDirectory)/publish/symbols-osx.tar.gz'
5557
replaceExistingArchive: true
5658

5759
- task: PublishPipelineArtifact@0
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
steps:
2+
- task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@2
3+
displayName: Install signing plugin
4+
condition: and(succeeded(), eq(variables['SignType'], 'real'))
5+
inputs:
6+
signType: '$(SignType)'
7+
8+
- task: UseDotNet@2
9+
displayName: Use .NET Core SDK 3.1.x
10+
inputs:
11+
packageType: sdk
12+
version: 3.1.x
13+
14+
- task: NuGetToolInstaller@0
15+
displayName: Install NuGet tool >=4.3.0
16+
inputs:
17+
versionSpec: '>=4.3.0'
18+
19+
# Must use the NuGet & MSBuild toolchain here rather than `dotnet`
20+
# because the signing tasks target the netfx MSBuild runtime only.
21+
- task: NuGetCommand@2
22+
displayName: Restore packages
23+
inputs:
24+
command: restore
25+
restoreSolution: 'Git-Credential-Manager.sln'
26+
configuration: 'Windows$(configuration)'
27+
28+
- task: MSBuild@1
29+
displayName: Compile common code and Windows helpers
30+
inputs:
31+
solution: 'Git-Credential-Manager.sln'
32+
configuration: 'Windows$(configuration)'
33+
34+
- task: VSTest@2
35+
displayName: Run common unit tests
36+
inputs:
37+
testAssemblyVer2: |
38+
out\shared\*.Tests\bin\**\*.Tests.dll
39+
configuration: 'Windows$(configuration)'
40+
otherConsoleOptions: '/Framework:.NETCoreApp,Version=2.1'
41+
testRunTitle: 'Unit tests (Windows)'

.azure-pipelines/templates/windows/compile.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
steps:
2-
- task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@2
3-
displayName: Install signing plugin
4-
condition: and(succeeded(), eq(variables['SignType'], 'real'))
5-
inputs:
6-
signType: '$(SignType)'
7-
82
- task: UseDotNet@2
93
displayName: Use .NET Core SDK 3.1.x
104
inputs:
@@ -33,4 +27,3 @@ steps:
3327
arguments: '--configuration=Mac$(configuration)'
3428
publishTestResults: true
3529
testRunTitle: 'Unit tests (Windows)'
36-

.azure-pipelines/templates/windows/pack.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
steps:
2-
- script: dotnet tool install --global nbgv
2+
- script: dotnet tool install --tool-path .tools nbgv
33
displayName: Install Nerdbank.GitVersioning tool
44

5-
- script: nbgv cloud --common-vars
5+
- script: .tools\nbgv cloud --common-vars
66
displayName: Set version variables
77

88
- script: |

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,3 +337,6 @@ out/
337337

338338
# Temporary build directory
339339
.tmp/
340+
341+
# dotnet local tools
342+
.tools/

src/shared/GitHub/GitHubAuthentication.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ public async Task<AuthenticationPromptResult> GetAuthenticationAsync(Uri targetU
123123
var menuTitle = $"Select an authentication method for '{targetUri}'";
124124
var menu = new TerminalMenu(Context.Terminal, menuTitle)
125125
{
126-
new TerminalMenuItem(1, "Web browser", true),
127-
new TerminalMenuItem(2, "Username/password")
126+
new TerminalMenuItem(1, "Web browser"),
127+
new TerminalMenuItem(2, "Username/password", true)
128128
};
129129

130130
int option = menu.Show();

src/windows/GitHub.UI.Windows/Login/Login2FaViewModel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ public Login2FaViewModel(TwoFactorType twoFactorType)
1818
NavigateLearnMoreCommand = new RelayCommand(NavigateLearnMore);
1919
}
2020

21+
public override bool IsValid => CanVerify();
22+
2123
public override string Title => GitHubResources.TwoFactorTitle;
2224

2325
public TwoFactorType TwoFactorType

src/windows/GitHub.UI.Windows/Login/LoginCredentialsViewModel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ private void LoginCredentialsViewModel_PropertyChanged(object sender, PropertyCh
2727
}
2828
}
2929

30+
public override bool IsValid => IsLoginUsingBrowserVisible || CanLoginUsingUsernameAndPassword();
31+
3032
public override string Title => GitHubResources.LoginTitle;
3133

3234
/// <summary>

0 commit comments

Comments
 (0)