8000 Merge branch 'master' into fixes/2187-unify-repository-list-tabs · github/VisualStudio@761e780 · GitHub
[go: up one dir, main page]

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

Commit 761e780

Browse files
authored
Merge branch 'master' into fixes/2187-unify-repository-list-tabs
2 parents fde9cb1 + 467d5b2 commit 761e780

File tree

4 files changed

+56
-58
lines changed

4 files changed

+56
-58
lines changed

appveyor.yml

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,27 @@
11
os: Visual Studio 2017
22
version: '2.8.0.{build}'
33
skip_tags: true
4+
5+
environment:
6+
matrix:
7+
- BUILD_TYPE: normal
8+
49
install:
10+
- choco install --no-progress BCC-MSBuildLog
11+
- choco install --no-progress BCC-Submission
512
- ps: |
613
$full_build = Test-Path env:GHFVS_KEY
14+
$forVSInstaller = $env:BUILD_TYPE -eq "vsinstaller"
15+
$package = $full_build -and ($env:APPVEYOR_PULL_REQUEST_NUMBER -or $env:APPVEYOR_REPO_BRANCH -eq "master" -or $forVSInstaller -or $env:BUILD_TYPE -eq "package")
16+
17+
$message = "Building "
18+
if ($package) { $message += "and packaging "}
19+
$message += "version " + $env:APPVEYOR_BUILD_NUMBER + " "
20+
21+
if ($full_build) { $message += "(full build)" } else { $message += "(partial build)" }
22+
if ($forVSInstaller) { $message += " for the VS installer" }
23+
Write-Host $message
24+
725
git submodule init
826
git submodule sync
927
@@ -18,19 +36,28 @@ install:
1836
1937
git submodule update --recursive --force
2038
nuget restore GitHubVS.sln
21-
- choco install --no-progress BCC-MSBuildLog
22-
- choco install --no-progress BCC-Submission
39+
2340
build_script:
24-
- ps: scripts\build.ps1 -AppVeyor -BuildNumber:$env:APPVEYOR_BUILD_NUMBER
41+
- ps: scripts\build.ps1 -AppVeyor -Package:$package -BuildNumber:$env:APPVEYOR_BUILD_NUMBER -ForVSInstaller:$forVSInstaller
42+
2543
test:
2644
categories:
2745
except:
2846
- Timings
47+
2948
on_success:
3049
- ps: |
31-
if ($full_build) {
32-
script\Sign-Package -AppVeyor
50+
if ($package) {
51+
Write-Host "Signing and packaging"
52+
script\Sign-Package -AppVeyor -ForVSInstaller:$forVSInstaller
3353
}
34-
on_finish:
35-
- IF NOT "%BCC_TOKEN%x"=="x" BCCMSBuildLog --cloneRoot "%APPVEYOR_BUILD_FOLDER%" --input output.binlog --output checkrun.json --ownerRepo %APPVEYOR_REPO_NAME% --hash %APPVEYOR_REPO_COMMIT%
36-
- IF NOT "%BCC_TOKEN%x"=="x" BCCSubmission -h %APPVEYOR_REPO_COMMIT% -i checkrun.json -t %BCC_TOKEN%
54+
55+
for:
56+
-
57+
branches:
58+
only:
59+
- /releases/.*-vsinstaller/
60+
environment:
61+
matrix:
62+
- BUILD_TYPE: vsinstaller
63+
- BUILD_TYPE: package

scripts/build.ps1

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ Param(
3838
,
3939
[switch]
4040
$Trace = $false
41+
,
42+
[switch]
43+
$ForVSInstaller = $false
44+
4145
)
4246

4347
Set-StrictMode -Version Latest
@@ -53,6 +57,10 @@ Vsix | out-null
5357

5458
Push-Location $rootDirectory
5559

60+
if ($Package -and $BuildNumber -gt -1) {
61+
$BumpVersion = $true
62+
}
63+
5664
if ($UpdateSubmodules) {
5765
Update-Submodules
5866
}
@@ -61,13 +69,6 @@ if ($Clean) {
6169
Clean-WorkingTree
6270
}
6371

64-
$fullBuild = Test-Path env:GHFVS_KEY
65-
$publishable = $fullBuild -and $AppVeyor -and ($env:APPVEYOR_PULL_REQUEST_NUMBER -or $env:APPVEYOR_REPO_BRANCH -eq "master")
66-
if ($publishable) { #forcing a deploy flag for CI
67-
$Package = $true
68-
$BumpVersion = $true
69-
}
70-
7172
if ($BumpVersion) {
7273
Write-Output "Bumping the version"
7374
Bump-Version -BumpBuild -BuildNumber:$BuildNumber
@@ -79,6 +80,6 @@ if ($Package) {
7980
Write-Output "Building GitHub for Visual Studio"
8081
}
8182

82-
Build-Solution GitHubVs.sln "Build" $config -Deploy:$Package
83+
Build-Solution GitHubVs.sln "Build" $config -Deploy:$Package -ForVSInstaller:$ForVSInstaller
8384

8485
Pop-Location

scripts/modules.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ New-Module -ScriptBlock {
114114
$msbuild
115115
}
116116

117-
function Build-Solution([string]$solution, [string]$target, [string]$configuration, [switch]$ForVSInstaller, [bool]$Deploy = $false) {
117+
function Build-Solution([string]$solution, [string]$target, [string]$configuration, [switch]$ForVSInstaller = $false, [bool]$Deploy = $false) {
118118
$msbuild = Find-MSBuild
119119

120120
Run-Command -Fatal { & $nuget restore $solution -NonInteractive -Verbosity detailed -MSBuildPath (Split-Path -parent $msbuild) }

src/GitHub.VisualStudio.UI/UI/Controls/PullRequestStatusCircle.xaml.cs

Lines changed: 11 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -23,57 +23,33 @@ public partial class PullRequestStatusCircle : UserControl
2323
{
2424
public static readonly DependencyProperty ErrorCountProperty = DependencyProperty.Register(
2525
"ErrorCount", typeof(int), typeof(PullRequestStatusCircle),
26-
new PropertyMetadata(0, OnErrorCountChanged));
27-
28-
private static void OnErrorCountChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs eventArgs)
29-
{
30-
var pullRequestStatusCircle = ((PullRequestStatusCircle)dependencyObject);
31-
pullRequestStatusCircle.ErrorCount = (int)eventArgs.NewValue;
32-
pullRequestStatusCircle.GeneratePolygons();
33-
}
26+
new PropertyMetadata(0, GeneratePolygons));
3427

3528
public static readonly DependencyProperty SuccessCountProperty = DependencyProperty.Register(
3629
"SuccessCount", typeof(int), typeof(PullRequestStatusCircle),
37-
new PropertyMetadata(0, OnSuccessCountChanged));
38-
39-
private static void OnSuccessCountChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs eventArgs)
40-
{
41-
var pullRequestStatusCircle = ((PullRequestStatusCircle)dependencyObject);
42-
pullRequestStatusCircle.SuccessCount = (int)eventArgs.NewValue;
43-
pullRequestStatusCircle.GeneratePolygons();
44-
}
30+
new PropertyMetadata(0, GeneratePolygons));
4531

4632
public static readonly DependencyProperty PendingCountProperty = DependencyProperty.Register(
4733
"PendingCount", typeof(int), typeof(PullRequestStatusCircle),
48-
new PropertyMetadata(0, OnPendingCountChanged));
34+
new PropertyMetadata(0, GeneratePolygons));
4935

50-
private static void OnPendingCountChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs eventArgs)
36+
private static void GeneratePolygons(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs eventArgs)
5137
{
52-
var pullRequestStatusCircle = ((PullRequestStatusCircle) dependencyObject);
53-
pullRequestStatusCircle.PendingCount = (int) eventArgs.NewValue;
38+
var pullRequestStatusCircle = ((PullRequestStatusCircle)dependencyObject);
5439
pullRequestStatusCircle.GeneratePolygons();
5540
}
5641

5742
public static readonly DependencyProperty RadiusProperty = DependencyProperty.Register(
5843
"Radius", typeof(double), typeof(PullRequestStatusCircle),
59-
new PropertyMetadata((double)250, OnRadiusChanged));
60-
61-
private static void OnRadiusChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs eventArgs)
62-
{
63-
var pullRequestStatusCircle = ((PullRequestStatusCircle) dependencyObject);
64-
pullRequestStatusCircle.Radius = (double) eventArgs.NewValue;
65-
pullRequestStatusCircle.GenerateMask();
66-
pullRequestStatusCircle.GeneratePolygons();
67-
}
44+
new PropertyMetadata((double)250, GenerateMaskAndPolygons));
6845

6946
public static readonly DependencyProperty InnerRadiusProperty = DependencyProperty.Register(
7047
"InnerRadius", typeof(double), typeof(PullRequestStatusCircle),
71-
new PropertyMetadata((double)200, OnInnerRadiusChanged));
48+
new PropertyMetadata((double)200, GenerateMaskAndPolygons));
7249

73-
private static void OnInnerRadiusChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs eventArgs)
50+
private static void GenerateMaskAndPolygons(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs eventArgs)
7451
{
7552
var pullRequestStatusCircle = ((PullRequestStatusCircle) dependencyObject);
76-
pullRequestStatusCircle.InnerRadius = (double) eventArgs.NewValue;
7753
pullRequestStatusCircle.GenerateMask();
7854
pullRequestStatusCircle.GeneratePolygons();
7955
}
@@ -85,9 +61,7 @@ private static void OnInnerRadiusChanged(DependencyObject dependencyObject, Depe
8561
private static void OnPendingColorChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs eventArgs)
8662
{
8763
var pullRequestStatusCircle = ((PullRequestStatusCircle) dependencyObject);
88-
var brush = (Brush) eventArgs.NewValue;
89-
pullRequestStatusCircle.PendingColor = brush;
90-
pullRequestStatusCircle.PendingPolygon.Fill = brush;
64+
pullRequestStatusCircle.PendingPolygon.Fill = (Brush) eventArgs.NewValue;
9165
}
9266

9367
public static readonly DependencyProperty ErrorColorProperty = DependencyProperty.Register(
@@ -97,9 +71,7 @@ private static void OnPendingColorChanged(DependencyObject dependencyObject, Dep
9771
private static void OnErrorColorChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs eventArgs)
9872
{
9973
var pullRequestStatusCircle = ((PullRequestStatusCircle) dependencyObject);
100-
var brush = (Brush) eventArgs.NewValue;
101-
pullRequestStatusCircle.ErrorColor = brush;
102-
pullRequestStatusCircle.ErrorPolygon.Fill = brush;
74+
pullRequestStatusCircle.ErrorPolygon.Fill = (Brush) eventArgs.NewValue;
10375
}
10476

10577
public static readonly DependencyProperty SuccessColorProperty = DependencyProperty.Register(
@@ -109,9 +81,7 @@ private static void OnErrorColorChanged(DependencyObject dependencyObject, Depen
10981
private static void OnSuccessColorChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs eventArgs)
11082
{
11183
var pullRequestStatusCircle = ((PullRequestStatusCircle) dependencyObject);
112-
var brush = (Brush) eventArgs.NewValue;
113-
pullRequestStatusCircle.SuccessColor = brush;
114-
pullRequestStatusCircle.SuccessPolygon.Fill = brush;
84+
pullRequestStatusCircle.SuccessPolygon.Fill = (Brush) eventArgs.NewValue;
11585
}
11686

11787
public IEnumerable<Point> GeneratePoints(float percentage)

0 commit comments

Comments
 (0)
0