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

Commit ef6e9d4

Browse files
committed
Add support for doing vs installer packages in appveyor
1 parent c5ef0d8 commit ef6e9d4

File tree

3 files changed

+42
-12
lines changed

3 files changed

+42
-12
lines changed

appveyor.yml

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
11
os: Visual Studio 2017
22
version: '2.6.0.{build}'
33
skip_tags: true
4+
5+
environment:
6+
matrix:
7+
- BUILD_TYPE: normal
8+
49
install:
510
- ps: |
611
$full_build = Test-Path env:GHFVS_KEY
12+
$forVSInstaller = $env:BUILD_TYPE -eq "vsinstaller"
13+
$package = $full_build -and ($env:APPVEYOR_PULL_REQUEST_NUMBER -or $env:APPVEYOR_REPO_BRANCH -eq "master" -or $forVSInstaller -or $env:BUILD_TYPE -eq "package")
14+
15+
$message = "Building "
16+
if ($package) { $message += "and packaging "}
17+
$message += "version " + $env:APPVEYOR_BUILD_NUMBER + " "
18+
19+
if ($full_build) { $message += "(full build)" } else { $message += "(partial build)" }
20+
if ($forVSInstaller) { $message += " for the VS installer" }
21+
Write-Host $message
22+
723
git submodule init
824
git submodule sync
925
@@ -20,17 +36,30 @@ install:
2036
nuget restore GitHubVS.sln
2137
- choco install --no-progress BCC-MSBuildLog
2238
- 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
2542
test:
2643
categories:
2744
except:
2845
- Timings
2946
on_success:
3047
- ps: |
31-
if ($full_build) {
32-
script\Sign-Package -AppVeyor
48+
if ($package) {
49+
Write-Host "Signing and packaging"
50+
script\Sign-Package -AppVeyor -ForVSInstaller:$forVSInstaller
3351
}
52+
3453
on_finish:
3554
- 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%
3655
- IF NOT "%BCC_TOKEN%x"=="x" BCCSubmission -h %APPVEYOR_REPO_COMMIT% -i checkrun.json -t %BCC_TOKEN%
56+
57+
for:
58+
-
59+
branches:
60+
only:
61+
- /releases/.*-vsinstaller/
62+
environment:
63+
matrix:
64+
- BUILD_TYPE: vsinstaller
65+
- 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) }

0 commit comments

Comments
 (0)