Skip to content

Commit 0e2e64e

Browse files
authored
Merge pull request #18 from mjcheetham/reorganise-build
Enable building Mac/Windows specific solution projects
2 parents 196378f + 53ddd2c commit 0e2e64e

File tree

83 files changed

+236
-126
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+236
-126
lines changed

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"request": "launch",
1111
"preLaunchTask": "build",
1212
// If you have changed target frameworks, make sure to update the program path.
13-
"program": "${workspaceFolder}/src/git-credential-manager/bin/Debug/netcoreapp2.1/git-credential-manager.dll",
13+
"program": "${workspaceFolder}/common/src/Git-Credential-Manager/bin/Debug/netcoreapp2.1/git-credential-manager.dll",
1414
"args": ["get"],
15-
"cwd": "${workspaceFolder}/src/git-credential-manager",
15+
"cwd": "${workspaceFolder}/common/src/Git-Credential-Manager",
1616
"console": "integratedTerminal",
1717
"stopAtEntry": false,
1818
},

.vscode/tasks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"args": [
1313
"build",
14-
"${workspaceFolder}/src/git-credential-manager/git-credential-manager.csproj"
14+
"${workspaceFolder}/common/src/Git-Credential-Manager/Git-Credential-Manager.csproj"
1515
],
1616
"problemMatcher": "$msCompile"
1717
},
@@ -25,7 +25,7 @@
2525
},
2626
"args": [
2727
"test",
28-
"${workspaceFolder}/tests/**/*.csproj"
28+
"${workspaceFolder}/common/tests/**/*.csproj"
2929
],
3030
"presentation": {
3131
"reveal": "always",

Git-Credential-Manager.sln

Lines changed: 66 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,105 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.28307.168
5+
MinimumVisualStudioVersion = 10.0.40219.1
36
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A7FC1234-95E3-4496-B5F7-4306F41E6A0E}"
47
EndProject
58
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{4B305AC9-153F-4EA3-822F-3E5023BABAF1}"
69
EndProject
7-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "git-credential-manager", "src\git-credential-manager\git-credential-manager.csproj", "{28F06D44-AB25-4CF5-93F9-978C23FAA9D6}"
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Git-Credential-Manager", "common\src\Git-Credential-Manager\Git-Credential-Manager.csproj", "{28F06D44-AB25-4CF5-93F9-978C23FAA9D6}"
811
EndProject
9-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Git.CredentialManager", "src\Microsoft.Git.CredentialManager\Microsoft.Git.CredentialManager.csproj", "{31BCFC70-B767-4274-873F-1A076D422FC3}"
12+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Git.CredentialManager", "common\src\Microsoft.Git.CredentialManager\Microsoft.Git.CredentialManager.csproj", "{31BCFC70-B767-4274-873F-1A076D422FC3}"
1013
EndProject
11-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Git.CredentialManager.Tests", "tests\Microsoft.Git.CredentialManager.Tests\Microsoft.Git.CredentialManager.Tests.csproj", "{AD41FA1E-51F5-4E4F-B7DA-32F921491313}"
14+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Git.CredentialManager.Tests", "common\tests\Microsoft.Git.CredentialManager.Tests\Microsoft.Git.CredentialManager.Tests.csproj", "{AD41FA1E-51F5-4E4F-B7DA-32F921491313}"
1215
EndProject
13-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AzureRepos", "src\Microsoft.AzureRepos\Microsoft.AzureRepos.csproj", "{714AF9EB-44E6-4058-BD3E-9039F29F4D7A}"
16+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AzureRepos", "common\src\Microsoft.AzureRepos\Microsoft.AzureRepos.csproj", "{714AF9EB-44E6-4058-BD3E-9039F29F4D7A}"
1417
EndProject
15-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AzureRepos.Tests", "tests\Microsoft.AzureRepos.Tests\Microsoft.AzureRepos.Tests.csproj", "{97DC6241-1240-4A85-8035-F8404A983A82}"
18+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AzureRepos.Tests", "common\tests\Microsoft.AzureRepos.Tests\Microsoft.AzureRepos.Tests.csproj", "{97DC6241-1240-4A85-8035-F8404A983A82}"
19+
EndProject
20+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows", "windows", "{66722747-1B61-40E4-A89B-1AC8E6D62EA9}"
21+
EndProject
22+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "common", "common", "{A9C4E7AA-8004-4EED-B8E0-33A365AEF3D1}"
23+
EndProject
24+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{1229E443-E66C-402F-8AA4-5AE6A207D3C7}"
25+
EndProject
26+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{DD8B847B-286B-4928-867B-E09C6C90DA1F}"
27+
EndProject
28+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestInfrastructure", "common\tests\TestInfrastructure\TestInfrastructure.csproj", "{5A7D9E8B-C1D2-4C5C-BE98-648C41D1F8BD}"
1629
EndProject
1730
Global
1831
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1932
Debug|Any CPU = Debug|Any CPU
2033
Release|Any CPU = Release|Any CPU
21-
EndGlobalSection
22-
GlobalSection(NestedProjects) = preSolution
23-
{28F06D44-AB25-4CF5-93F9-978C23FAA9D6} = {A7FC1234-95E3-4496-B5F7-4306F41E6A0E}
24-
{31BCFC70-B767-4274-873F-1A076D422FC3} = {A7FC1234-95E3-4496-B5F7-4306F41E6A0E}
25-
{AD41FA1E-51F5-4E4F-B7DA-32F921491313} = {4B305AC9-153F-4EA3-822F-3E5023BABAF1}
26-
{714AF9EB-44E6-4058-BD3E-9039F29F4D7A} = {A7FC1234-95E3-4496-B5F7-4306F41E6A0E}
27-
{97DC6241-1240-4A85-8035-F8404A983A82} = {4B305AC9-153F-4EA3-822F-3E5023BABAF1}
34+
WindowsDebug|Any CPU = WindowsDebug|Any CPU
35+
WindowsRelease|Any CPU = WindowsRelease|Any CPU
2836
EndGlobalSection
2937
GlobalSection(ProjectConfigurationPlatforms) = postSolution
3038
{28F06D44-AB25-4CF5-93F9-978C23FAA9D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
3139
{28F06D44-AB25-4CF5-93F9-978C23FAA9D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
3240
{28F06D44-AB25-4CF5-93F9-978C23FAA9D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
3341
{28F06D44-AB25-4CF5-93F9-978C23FAA9D6}.Release|Any CPU.Build.0 = Release|Any CPU
42+
{28F06D44-AB25-4CF5-93F9-978C23FAA9D6}.WindowsDebug|Any CPU.ActiveCfg = Debug|Any CPU
43+
{28F06D44-AB25-4CF5-93F9-978C23FAA9D6}.WindowsDebug|Any CPU.Build.0 = Debug|Any CPU
44+
{28F06D44-AB25-4CF5-93F9-978C23FAA9D6}.WindowsRelease|Any CPU.ActiveCfg = Release|Any CPU
45+
{28F06D44-AB25-4CF5-93F9-978C23FAA9D6}.WindowsRelease|Any CPU.Build.0 = Release|Any CPU
3446
{31BCFC70-B767-4274-873F-1A076D422FC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
3547
{31BCFC70-B767-4274-873F-1A076D422FC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
3648
{31BCFC70-B767-4274-873F-1A076D422FC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
3749
{31BCFC70-B767-4274-873F-1A076D422FC3}.Release|Any CPU.Build.0 = Release|Any CPU
50+
{31BCFC70-B767-4274-873F-1A076D422FC3}.WindowsDebug|Any CPU.ActiveCfg = Debug|Any CPU
51+
{31BCFC70-B767-4274-873F-1A076D422FC3}.WindowsDebug|Any CPU.Build.0 = Debug|Any CPU
52+
{31BCFC70-B767-4274-873F-1A076D422FC3}.WindowsRelease|Any CPU.ActiveCfg = Release|Any CPU
53+
{31BCFC70-B767-4274-873F-1A076D422FC3}.WindowsRelease|Any CPU.Build.0 = Release|Any CPU
3854
{AD41FA1E-51F5-4E4F-B7DA-32F921491313}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
3955
{AD41FA1E-51F5-4E4F-B7DA-32F921491313}.Debug|Any CPU.Build.0 = Debug|Any CPU
4056
{AD41FA1E-51F5-4E4F-B7DA-32F921491313}.Release|Any CPU.ActiveCfg = Release|Any CPU
4157
{AD41FA1E-51F5-4E4F-B7DA-32F921491313}.Release|Any CPU.Build.0 = Release|Any CPU
58+
{AD41FA1E-51F5-4E4F-B7DA-32F921491313}.WindowsDebug|Any CPU.ActiveCfg = Debug|Any CPU
59+
{AD41FA1E-51F5-4E4F-B7DA-32F921491313}.WindowsDebug|Any CPU.Build.0 = Debug|Any CPU
60+
{AD41FA1E-51F5-4E4F-B7DA-32F921491313}.WindowsRelease|Any CPU.ActiveCfg = Release|Any CPU
61+
{AD41FA1E-51F5-4E4F-B7DA-32F921491313}.WindowsRelease|Any CPU.Build.0 = Release|Any CPU
4262
{714AF9EB-44E6-4058-BD3E-9039F29F4D7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
4363
{714AF9EB-44E6-4058-BD3E-9039F29F4D7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
4464
{714AF9EB-44E6-4058-BD3E-9039F29F4D7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
4565
{714AF9EB-44E6-4058-BD3E-9039F29F4D7A}.Release|Any CPU.Build.0 = Release|Any CPU
66+
{714AF9EB-44E6-4058-BD3E-9039F29F4D7A}.WindowsDebug|Any CPU.ActiveCfg = Debug|Any CPU
67+
{714AF9EB-44E6-4058-BD3E-9039F29F4D7A}.WindowsDebug|Any CPU.Build.0 = Debug|Any CPU
68+
{714AF9EB-44E6-4058-BD3E-9039F29F4D7A}.WindowsRelease|Any CPU.ActiveCfg = Release|Any CPU
69+
{714AF9EB-44E6-4058-BD3E-9039F29F4D7A}.WindowsRelease|Any CPU.Build.0 = Release|Any CPU
4670
{97DC6241-1240-4A85-8035-F8404A983A82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
4771
{97DC6241-1240-4A85-8035-F8404A983A82}.Debug|Any CPU.Build.0 = Debug|Any CPU
4872
{97DC6241-1240-4A85-8035-F8404A983A82}.Release|Any CPU.ActiveCfg = Release|Any CPU
4973
{97DC6241-1240-4A85-8035-F8404A983A82}.Release|Any CPU.Build.0 = Release|Any CPU
74+
{97DC6241-1240-4A85-8035-F8404A983A82}.WindowsDebug|Any CPU.ActiveCfg = Debug|Any CPU
75+
{97DC6241-1240-4A85-8035-F8404A983A82}.WindowsDebug|Any CPU.Build.0 = Debug|Any CPU
76+
{97DC6241-1240-4A85-8035-F8404A983A82}.WindowsRelease|Any CPU.ActiveCfg = Release|Any CPU
77+
{97DC6241-1240-4A85-8035-F8404A983A82}.WindowsRelease|Any CPU.Build.0 = Release|Any CPU
78+
{5A7D9E8B-C1D2-4C5C-BE98-648C41D1F8BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
79+
{5A7D9E8B-C1D2-4C5C-BE98-648C41D1F8BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
80+
{5A7D9E8B-C1D2-4C5C-BE98-648C41D1F8BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
81+
{5A7D9E8B-C1D2-4C5C-BE98-648C41D1F8BD}.Release|Any CPU.Build.0 = Release|Any CPU
82+
{5A7D9E8B-C1D2-4C5C-BE98-648C41D1F8BD}.WindowsDebug|Any CPU.ActiveCfg = Debug|Any CPU
83+
{5A7D9E8B-C1D2-4C5C-BE98-648C41D1F8BD}.WindowsDebug|Any CPU.Build.0 = Debug|Any CPU
84+
{5A7D9E8B-C1D2-4C5C-BE98-648C41D1F8BD}.WindowsRelease|Any CPU.ActiveCfg = Release|Any CPU
85+
{5A7D9E8B-C1D2-4C5C-BE98-648C41D1F8BD}.WindowsRelease|Any CPU.Build.0 = Release|Any CPU
86+
EndGlobalSection
87+
GlobalSection(SolutionProperties) = preSolution
88+
HideSolutionNode = FALSE
89+
EndGlobalSection
90+
GlobalSection(NestedProjects) = preSolution
91+
{28F06D44-AB25-4CF5-93F9-978C23FAA9D6} = {A7FC1234-95E3-4496-B5F7-4306F41E6A0E}
92+
{31BCFC70-B767-4274-873F-1A076D422FC3} = {A7FC1234-95E3-4496-B5F7-4306F41E6A0E}
93+
{AD41FA1E-51F5-4E4F-B7DA-32F921491313} = {4B305AC9-153F-4EA3-822F-3E5023BABAF1}
94+
{714AF9EB-44E6-4058-BD3E-9039F29F4D7A} = {A7FC1234-95E3-4496-B5F7-4306F41E6A0E}
95+
{97DC6241-1240-4A85-8035-F8404A983A82} = {4B305AC9-153F-4EA3-822F-3E5023BABAF1}
96+
{A7FC1234-95E3-4496-B5F7-4306F41E6A0E} = {A9C4E7AA-8004-4EED-B8E0-33A365AEF3D1}
97+
{4B305AC9-153F-4EA3-822F-3E5023BABAF1} = {A9C4E7AA-8004-4EED-B8E0-33A365AEF3D1}
98+
{1229E443-E66C-402F-8AA4-5AE6A207D3C7} = {66722747-1B61-40E4-A89B-1AC8E6D62EA9}
99+
{DD8B847B-286B-4928-867B-E09C6C90DA1F} = {66722747-1B61-40E4-A89B-1AC8E6D62EA9}
100+
{5A7D9E8B-C1D2-4C5C-BE98-648C41D1F8BD} = {4B305AC9-153F-4EA3-822F-3E5023BABAF1}
101+
EndGlobalSection
102+
GlobalSection(ExtensibilityGlobals) = postSolution
103+
SolutionGuid = {0EF9FC65-E6BA-45D4-A455-262A9EA4366B}
50104
EndGlobalSection
51105
EndGlobal

build/continuous-integration.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ trigger:
22
- master
33

44
variables:
5-
configuration: release
5+
configuration: Release
66

77
jobs:
8-
- template: templates/build-and-test.yml
9-
parameters:
10-
name: Windows
8+
- job: Windows
9+
pool:
1110
vmImage: vs2017-win2016
11+
steps:
12+
- template: templates/build-and-test.windows.yml
1213

13-
- template: templates/build-and-test.yml
14-
parameters:
15-
name: macOS
14+
- job: macOS
15+
pool:
1616
vmImage: macOS 10.13
17+
steps:
18+
- template: templates/build-and-test.macos.yml

build/pull-request.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
trigger: none
22

33
variables:
4-
configuration: release
4+
configuration: Release
55

66
jobs:
7-
- template: templates/build-and-test.yml
8-
parameters:
9-
name: Windows
7+
- job: Windows
8+
pool:
109
vmImage: vs2017-win2016
10+
steps:
11+
- template: templates/build-and-test.windows.yml
1112

12-
- template: templates/build-and-test.yml
13-
parameters:
14-
name: macOS
13+
- job: macOS
14+
pool:
1515
vmImage: macOS 10.13
16+
steps:
17+
- template: templates/build-and-test.macos.yml
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
steps:
2+
- task: DotNetCoreInstaller@0
3+
displayName: Install .NET Core SDK 2.2.100
4+
inputs:
5+
packageType: sdk
6+
version: '2.2.100'
7+
8+
- task: DotNetCoreCLI@2
9+
displayName: Compile common code
10+
inputs:
11+
command: build
12+
projects: 'Git-Credential-Manager.sln'
13+
arguments: '--configuration=$(configuration) --runtime=osx-x64'
14+
15+
- task: DotNetCoreCLI@2
16+
displayName: Run common unit tests
17+
inputs:
18+
command: test
19+
projects: 'Git-Credential-Manager.sln'
20+
arguments: '--configuration=$(configuration)'
21+
publishTestResults: true
22+
#testRunTitle: 'Common unit tests (macOS)' # option not yet available
23+
continueOnError: true
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
steps:
2+
- task: DotNetCoreInstaller@0
3+
displayName: Install .NET Core SDK 2.2.100
4+
inputs:
5+
packageType: sdk
6+
version: '2.2.100'
7+
8+
- task: NuGetToolInstaller@0
9+
displayName: Install NuGet tool >=4.3.0
10+
inputs:
11+
versionSpec: '>=4.3.0'
12+
13+
- task: NuGetCommand@2
14+
displayName: Restore packages
15+
inputs:
16+
command: restore
17+
restoreSolution: 'Git-Credential-Manager.sln'
18+
configuration: 'Windows$(configuration)'
19+
20+
- task: MSBuild@1
21+
displayName: Compile common code and Windows helpers
22+
inputs:
23+
solution: 'Git-Credential-Manager.sln'
24+
configuration: 'Windows$(configuration)'
25+
26+
- task: VSTest@2
27+
displayName: Run common unit tests
28+
inputs:
29+
testAssemblyVer2: |
30+
common\tests\**\*.Tests.dll
31+
!**\obj\**
32+
configuration: 'Windows$(configuration)'
33+
testRunTitle: 'Common unit tests (Windows)'
34+
continueOnError: true
35+
36+
- task: VSTest@2
37+
displayName: Run Windows helpers unit tests
38+
inputs:
39+
testAssemblyVer2: |
40+
windows\tests\**\*.Tests.dll
41+
!**\obj\**
42+
configuration: 'Windows$(configuration)'
43+
testRunTitle: 'Windows helpers unit tests'
44+
continueOnError: true

build/templates/build-and-test.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/git-credential-manager/git-credential-manager.csproj renamed to common/src/Git-Credential-Manager/Git-Credential-Manager.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<RuntimeIdentifiers>win-x64;osx-x64</RuntimeIdentifiers>
77
<AssemblyName>git-credential-manager</AssemblyName>
88
<RootNamespace>Microsoft.Git.CredentialManager</RootNamespace>
9+
<IsTestProject>false</IsTestProject>
910
<LangVersion>latest</LangVersion>
1011
</PropertyGroup>
1112

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT license.
3+
using System;
4+
using Microsoft.AzureRepos;
5+
6+
namespace Microsoft.Git.CredentialManager
7+
{
8+
public static class Program
9+
{
10+
public static void Main(string[] args)
11+
{
12+
var context = new CommandContext();
13+
using (var app = new Application(context))
14+
{
15+
// Register all supported host providers
16+
app.ProviderRegistry.Register(
17+
new AzureReposHostProvider(context),
18+
new GenericHostProvider(context)
19+
);
20+
21+
// Run!
22+
int exitCode = app.RunAsync(args)
23+
.ConfigureAwait(false)
24+
.GetAwaiter()
25+
.GetResult();
26+
27+
Environment.Exit(exitCode);
28+
}
29+
}
30+
}
31+
}

0 commit comments

Comments
 (0)