Skip to content

Commit cc33e82

Browse files
Ability to specify PSES branch and fork in CI build (#2604)
* Specify PSES Branch * added fork info * add log * typo Co-authored-by: Robert Holt <[email protected]>
1 parent b856a07 commit cc33e82

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.vsts-ci/templates/ci-general.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@ steps:
33
- pwsh: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhmmss"))"
44
displayName: Set Build Name for Non-PR
55
condition: ne(variables['Build.Reason'], 'PullRequest')
6+
- task: PowerShell@2
7+
displayName: 'Set environment variables for VSTS (Phase 1)'
8+
inputs:
9+
targetType: filePath
10+
filePath: ./tools/releaseBuild/setVstsVariables.ps1
611
- pwsh: |
7-
git clone https://github.com/PowerShell/PowerShellEditorServices.git ../PowerShellEditorServices
12+
Write-Host "Cloning '$env:PSES_BRANCH' branch from '$env:PSES_FORK/PowerShellEditorServices'"
13+
git clone --single-branch --branch $env:PSES_BRANCH https://github.com/$env:PSES_FORK/PowerShellEditorServices.git ../PowerShellEditorServices
814
Install-Module InvokeBuild -Scope CurrentUser -Force
915
Install-Module PlatyPS -Scope CurrentUser -Force
1016
# Build

tools/releaseBuild/setVstsVariables.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
$vstsVariables = @{
22
PSES_BRANCH = 'master'
3+
PSES_FORK = 'PowerShell'
34
}
45

56
# Use VSTS's API to set an env vars

0 commit comments

Comments
 (0)