Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit f263275

Browse files
committed
Merge branch 'master' into internationalization
2 parents 0e78801 + 4eef5b3 commit f263275

File tree

90 files changed

+600
-5451
lines changed

Some content is hidden

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

90 files changed

+600
-5451
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@ $RECYCLE.BIN/
232232
*.msm
233233
*.msp
234234

235+
#OpenCover output
236+
coverage.xml
237+
235238
AkavacheSqliteLinkerOverride.cs
236239
NuGetBuild
237240
WiX.Toolset.DummyFile.txt

Directory.Build.Props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project>
2+
<PropertyGroup>
3+
<Product>GitHub Extension for Visual Studio</Product>
4+
<Version>2.5.6.0</Version>
5+
<Copyright>Copyright © GitHub, Inc. 2014-2018</Copyright>
6+
<LangVersion>7.3</LangVersion>
7+
</PropertyGroup>
8+
</Project>

GitHubVS.sln

Lines changed: 46 additions & 59 deletions
Large diffs are not rendered by default.

appveyor.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,10 @@ test:
2424
categories:
2525
except:
2626
- Timings
27-
after_test:
28-
- ps: |
29-
choco install --no-progress opencover.portable codecov
30-
OpenCover.Console.exe --% "-target:nunit3-console.exe" "-targetargs: test\GitHub.Api.UnitTests\bin\Release\GitHub.Api.UnitTests.dll test\GitHub.App.UnitTests\bin\Release\GitHub.App.UnitTests.dll test\GitHub.Exports.Reactive.UnitTests\bin\Release\GitHub.Exports.Reactive.UnitTests.dll test\GitHub.Exports.UnitTests\bin\Release\GitHub.Exports.UnitTests.dll test\GitHub.Extensions.UnitTests\bin\Release\GitHub.Extensions.UnitTests.dll test\GitHub.InlineReviews.UnitTests\bin\Release\GitHub.InlineReviews.UnitTests.dll test\GitHub.Primitives.UnitTests\bin\Release\GitHub.Primitives.UnitTests.dll test\GitHub.TeamFoundation.UnitTests\bin\Release\GitHub.TeamFoundation.UnitTests.dll test\GitHub.UI.UnitTests\bin\Release\GitHub.UI.UnitTests.dll test\GitHub.VisualStudio.UnitTests\bin\Release\GitHub.VisualStudio.UnitTests.dll test\MetricsTests\MetricsTests\bin\Release\MetricsTests.dll test\TrackingCollectionTests\bin\Release\TrackingCollectionTests.dll --where cat!=Timings --inprocess --noresult" -filter:"+[GitHub*]* -[GitHub*UnitTests]*" -register:user -output:".\coverage.xml"
31-
codecov -f "coverage.xml"
3227
on_success:
3328
- ps: |
3429
if ($full_build) {
3530
script\Sign-Package -AppVeyor
3631
}
32+
on_finish:
33+
- ps: scripts\Run-CodeCoverage.ps1 -AppVeyor -Configuration:Release

global.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"msbuild-sdks": {
3+
"MSBuild.Sdk.Extras": "1.6.52"
4+
}
5+
}

scripts/Bump-Version.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ if ($Trace) { Set-PSDebug -Trace 1 }
5353
. $scriptsDirectory\Modules\Vsix.ps1 | out-null
5454
. $scriptsDirectory\Modules\SolutionInfo.ps1 | out-null
5555
. $scriptsDirectory\Modules\AppVeyor.ps1 | out-null
56+
. $scriptsDirectory\Modules\DirectoryBuildProps.ps1 | out-null
5657

5758
if ($NewVersion -eq $null) {
5859
if (!$BumpMajor -and !$BumpMinor -and !$BumpPatch -and !$BumpBuild){

scripts/Run-CodeCoverage.ps1

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<#
2+
.SYNOPSIS
3+
Runs NUnit
4+
#>
5+
6+
[CmdletBinding()]
7+
Param(
8+
[string]
9+
$Configuration
10+
,
11+
[switch]
12+
$AppVeyor = $false
13+
)
14+
15+
$scriptsDirectory = $PSScriptRoot
16+
$rootDirectory = Split-Path ($scriptsDirectory)
17+
. $scriptsDirectory\modules.ps1 | out-null
18+
19+
$nunitDirectory = Join-Path $rootDirectory packages\NUnit.ConsoleRunner.3.7.0\tools
20+
$nunitConsoleRunner = Join-Path $nunitDirectory nunit3-console.exe
21+
22+
$testAssemblies = @(
23+
"test\GitHub.Api.UnitTests\bin\$Configuration\GitHub.Api.UnitTests.dll",
24+
"test\GitHub.App.UnitTests\bin\$Configuration\GitHub.App.UnitTests.dll",
25+
"test\GitHub.Exports.Reactive.UnitTests\bin\$Configuration\GitHub.Exports.Reactive.UnitTests.dll",
26+
"test\GitHub.Exports.UnitTests\bin\$Configuration\GitHub.Exports.UnitTests.dll",
27+
"test\GitHub.Extensions.UnitTests\bin\$Configuration\GitHub.Extensions.UnitTests.dll",
28+
"test\GitHub.InlineReviews.UnitTests\bin\$Configuration\GitHub.InlineReviews.UnitTests.dll",
29+
"test\GitHub.Primitives.UnitTests\bin\$Configuration\GitHub.Primitives.UnitTests.dll",
30+
"test\GitHub.TeamFoundation.UnitTests\bin\$Configuration\GitHub.TeamFoundation.UnitTests.dll",
31+
"test\GitHub.UI.UnitTests\bin\$Configuration\GitHub.UI.UnitTests.dll",
32+
"test\GitHub.VisualStudio.UnitTests\bin\$Configuration\GitHub.VisualStudio.UnitTests.dll",
33+
"test\MetricsTests\MetricsTests\bin\$Configuration\MetricsTests.dll",
34+
"test\TrackingCollectionTests\bin\$Configuration\TrackingCollectionTests.dll"
35+
)
36+
37+
$opencoverTargetArgs = ($testAssemblies -join " ") + " --where \`"cat!=Timings and cat!=CodeCoverageFlake\`" --inprocess --noresult"
38+
39+
$opencoverDirectory = Join-Path $rootDirectory packages\OpenCover.4.6.519\tools
40+
$opencover = Join-Path $opencoverDirectory OpenCover.Console.exe
41+
$opencoverArgs = @(
42+
"-target:`"$nunitConsoleRunner`"",
43+
"-targetargs:`"$opencoverTargetArgs`"",
44+
"-filter:`"+[GitHub*]* -[GitHub*UnitTests]*`"",
45+
"-register:user -output:$rootDirectory\coverage.xml"
46+
) -join " "
47+
48+
$codecovDirectory = Join-Path $rootDirectory packages\Codecov.1.0.5\tools
49+
$codecov = Join-Path $codecovDirectory codecov.exe
50+
$codecovArgs = "-f $rootDirectory\coverage.xml"
51+
52+
& {
53+
Trap {
54+
Write-Output "$Project tests failed"
55+
exit 0
56+
}
57+
58+
Run-Process 600 $opencover $opencoverArgs
59+
60+
if($AppVeyor) {
61+
Run-Process 60 $codecov $codecovArgs
62+
}
63+
64+
if (!$?) {
65+
Write-Output "$Project tests failed"
66+
exit 0
67+
}
68+
}

scripts/modules.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ New-Module -ScriptBlock {
7373
$output += Get-Content $outputPath
7474
$exitCode = $process.ExitCode
7575
} else {
76-
$output += "Tests timed out. Backtrace:"
76+
$output += "Process timed out. Backtrace:"
7777
$output += Get-DotNetStack $process.Id
7878
$exitCode = 9999
7979
}
@@ -129,8 +129,8 @@ New-Module -ScriptBlock {
129129

130130
$msbuild = Find-MSBuild
131131

132-
Write-Host "$msbuild $solution /target:$target /property:Configuration=$configuration /p:DeployExtension=false /verbosity:minimal /p:VisualStudioVersion=14.0 $flag1 $flag2"
133-
Run-Command -Fatal { & $msbuild $solution /target:$target /property:Configuration=$configuration /p:DeployExtension=false /verbosity:minimal /p:VisualStudioVersion=14.0 $flag1 $flag2 }
132+
Write-Host "$msbuild $solution /target:$target /property:Configuration=$configuration /p:DeployExtension=false /verbosity:minimal /p:VisualStudioVersion=15.0 $flag1 $flag2"
133+
Run-Command -Fatal { & $msbuild $solution /target:$target /property:Configuration=$configuration /p:DeployExtension=false /verbosity:minimal /p:VisualStudioVersion=15.0 $flag1 $flag2 }
134134
}
135135

136136
Export-ModuleMember -Function Find-MSBuild,Build-Solution
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Set-StrictMode -Version Latest
2+
3+
New-Module -ScriptBlock {
4+
function Get-DirectoryBuildPropsPath {
5+
Join-Path $rootDirectory Directory.Build.Props
6+
}
7+
8+
function Get-DirectoryBuildProps {
9+
$xmlLines = Get-Content (Get-DirectoryBuildPropsPath) -encoding UTF8
10+
[xml] $xmlLines
11+
}
12+
13+
function Write-DirectoryBuildProps([System.Version]$version) {
14+
15+
$document = Get-DirectoryBuildProps
16+
17+
$numberOfReplacements = 0
18+
$document.Project.PropertyGroup.Version = $version.ToString()
19+
20+
$document.Save((Get-DirectoryBuildPropsPath))
21+
}
22+
23+
Export-ModuleMember -Function Write-DirectoryBuildProps
24+
}

scripts/modules/Versioning.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ New-Module -ScriptBlock {
4242
Write-VersionVsixManifest $version
4343
Write-VersionSolutionInfo $version
4444
Write-VersionAppVeyor $version
45+
Write-DirectoryBuildProps $version
4546
Push-Location $rootDirectory
4647
New-Item -Type Directory -ErrorAction SilentlyContinue build | out-null
4748
Set-Content build\version $version
Lines changed: 5 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,12 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
42
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{41A47C5B-C606-45B4-B83C-22B9239E4DA0}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>CredentialManagement</RootNamespace>
11-
<AssemblyName>GitHub.CredentialManagement</AssemblyName>
12-
<LangVersion>7.3</LangVersion>
13-
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
14-
<FileAlignment>512</FileAlignment>
15-
<CodeAnalysisRuleSet>..\common\GitHubVS.ruleset</CodeAnalysisRuleSet>
16-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
17-
<CodeAnalysisIgnoreGeneratedCode>true</CodeAnalysisIgnoreGeneratedCode>
18-
</PropertyGroup>
19-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
20-
<DebugSymbols>true</DebugSymbols>
21-
<DebugType>full</DebugType>
22-
<Optimize>false</Optimize>
23-
<DefineConstants>DEBUG;TRACE</DefineConstants>
24-
<ErrorReport>prompt</ErrorReport>
25-
<WarningLevel>4</WarningLevel>
26-
<RunCodeAnalysis>false</RunCodeAnalysis>
27-
<OutputPath>bin\Debug\</OutputPath>
28-
</PropertyGroup>
29-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugCodeAnalysis|AnyCPU'">
30-
<DebugSymbols>true</DebugSymbols>
31-
<DebugType>full</DebugType>
32-
<Optimize>false</Optimize>
33-
<DefineConstants>CODE_ANALYSIS;DEBUG;TRACE</DefineConstants>
34-
<ErrorReport>prompt</ErrorReport>
35-
<WarningLevel>4</WarningLevel>
36-
<RunCodeAnalysis>true</RunCodeAnalysis>
37-
<OutputPath>bin\Debug\</OutputPath>
38-
</PropertyGroup>
39-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
40-
<DebugType>pdbonly</DebugType>
41-
<Optimize>true</Optimize>
42-
<DefineConstants>TRACE</DefineConstants>
43-
<ErrorReport>prompt</ErrorReport>
44-
<WarningLevel>4</WarningLevel>
45-
<RunCodeAnalysis>true</RunCodeAnalysis>
46-
<OutputPath>bin\Release\</OutputPath>
3+
<TargetFramework>net461</TargetFramework>
474
</PropertyGroup>
485
<Import Project="$(SolutionDir)\src\common\signing.props" />
496
<ItemGroup>
50-
<Reference Include="System" />
51-
<Reference Include="System.Core" />
52-
<Reference Include="System.Xml.Linq" />
53-
<Reference Include="System.Data.DataSetExtensions" />
54-
<Reference Include="Microsoft.CSharp" />
55-
<Reference Include="System.Data" />
56-
<Reference Include="System.Net.Http" />
57-
<Reference Include="System.Xml" />
58-
</ItemGroup>
59-
<ItemGroup>
60-
<Compile Include="..\common\SolutionInfo.cs">
61-
<Link>Properties\SolutionInfo.cs</Link>
62-
</Compile>
63-
<Compile Include="Credential.cs" />
64-
<Compile Include="CredentialSet.cs" />
65-
<Compile Include="CredentialType.cs" />
66-
<Compile Include="NativeMethods.cs" />
67-
<Compile Include="PersistenceType.cs" />
68-
<Compile Include="SecureStringHelper.cs" />
69-
<Compile Include="Properties\AssemblyInfo.cs" />
7+
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.1" />
708
</ItemGroup>
719
<ItemGroup>
72-
<ProjectReference Include="..\GitHub.Extensions\GitHub.Extensions.csproj">
73-
<Project>{6afe2e2d-6db0-4430-a2ea-f5f5388d2f78}</Project>
74-
<Name>GitHub.Extensions</Name>
75-
</ProjectReference>
10+
<ProjectReference Include="..\GitHub.Extensions\GitHub.Extensions.csproj" />
7611
</ItemGroup>
77-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
78-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
79-
Other similar extension points exist, see Microsoft.Common.targets.
80-
<Target Name="BeforeBuild">
81-
</Target>
82-
<Target Name="AfterBuild">
83-
</Target>
84-
-->
85-
</Project>
12+
</Project>

src/CredentialManagement/Properties/AssemblyInfo.cs

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

0 commit comments

Comments
 (0)