Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 35 additions & 8 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
os: Visual Studio 2017
version: '2.6.0.{build}'
skip_tags: true

environment:
matrix:
- BUILD_TYPE: normal

install:
- choco install --no-progress BCC-MSBuildLog
- choco install --no-progress BCC-Submission
- ps: |
$full_build = Test-Path env:GHFVS_KEY
$forVSInstaller = $env:BUILD_TYPE -eq "vsinstaller"
$package = $full_build -and ($env:APPVEYOR_PULL_REQUEST_NUMBER -or $env:APPVEYOR_REPO_BRANCH -eq "master" -or $forVSInstaller -or $env:BUILD_TYPE -eq "package")

$message = "Building "
if ($package) { $message += "and packaging "}
$message += "version " + $env:APPVEYOR_BUILD_NUMBER + " "

if ($full_build) { $message += "(full build)" } else { $message += "(partial build)" }
if ($forVSInstaller) { $message += " for the VS installer" }
Write-Host $message

git submodule init
git submodule sync

Expand All @@ -18,19 +36,28 @@ install:

git submodule update --recursive --force
nuget restore GitHubVS.sln
- choco install --no-progress BCC-MSBuildLog
- choco install --no-progress BCC-Submission

build_script:
- ps: scripts\build.ps1 -AppVeyor -BuildNumber:$env:APPVEYOR_BUILD_NUMBER
- ps: scripts\build.ps1 -AppVeyor -Package:$package -BuildNumber:$env:APPVEYOR_BUILD_NUMBER -ForVSInstaller:$forVSInstaller

test:
categories:
except:
- Timings

on_success:
- ps: |
if ($full_build) {
script\Sign-Package -AppVeyor
if ($package) {
Write-Host "Signing and packaging"
script\Sign-Package -AppVeyor -ForVSInstaller:$forVSInstaller
}
on_finish:
- 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%
- IF NOT "%BCC_TOKEN%x"=="x" BCCSubmission -h %APPVEYOR_REPO_COMMIT% -i checkrun.json -t %BCC_TOKEN%

for:
-
branches:
only:
- /releases/.*-vsinstaller/
environment:
matrix:
- BUILD_TYPE: vsinstaller
- BUILD_TYPE: package
17 changes: 9 additions & 8 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ Param(
,
[switch]
$Trace = $false
,
[switch]
$ForVSInstaller = $false

)

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

Push-Location $rootDirectory

if ($Package -and $BuildNumber -gt -1) {
$BumpVersion = $true
}

if ($UpdateSubmodules) {
Update-Submodules
}
Expand All @@ -61,13 +69,6 @@ if ($Clean) {
Clean-WorkingTree
}

$fullBuild = Test-Path env:GHFVS_KEY
$publishable = $fullBuild -and $AppVeyor -and ($env:APPVEYOR_PULL_REQUEST_NUMBER -or $env:APPVEYOR_REPO_BRANCH -eq "master")
if ($publishable) { #forcing a deploy flag for CI
$Package = $true
$BumpVersion = $true
}

if ($BumpVersion) {
Write-Output "Bumping the version"
Bump-Version -BumpBuild -BuildNumber:$BuildNumber
Expand All @@ -79,6 +80,6 @@ if ($Package) {
Write-Output "Building GitHub for Visual Studio"
}

Build-Solution GitHubVs.sln "Build" $config -Deploy:$Package
Build-Solution GitHubVs.sln "Build" $config -Deploy:$Package -ForVSInstaller:$ForVSInstaller

Pop-Location
2 changes: 1 addition & 1 deletion scripts/modules.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ New-Module -ScriptBlock {
$msbuild
}

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

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