File tree 2 files changed +20
-12
lines changed
2 files changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -62,19 +62,29 @@ steps:
62
62
version : 6.0.x
63
63
performMultiLevelLookup : true
64
64
65
+ # The build script is always run with PowerShell Core
65
66
- task : PowerShell@2
66
- displayName : Build and test
67
+ displayName : Build Package
67
68
inputs :
68
69
targetType : inline
69
70
script : |
70
71
Get-ChildItem env:
71
72
Get-Module -ListAvailable Pester
72
73
Install-Module InvokeBuild -Scope CurrentUser -Force
73
74
Install-Module platyPS -Scope CurrentUser -Force
74
- Invoke-Build -Configuration Release
75
+ Invoke-Build -Configuration Release Package
75
76
$PackageJson = Get-Content -Raw package.json | ConvertFrom-Json
76
77
Write-Host "##vso[task.setvariable variable=vsixPath]$(Resolve-Path powershell-$($PackageJson.version).vsix)"
77
78
workingDirectory : $(Build.SourcesDirectory)/vscode-powershell
79
+
80
+ # Tests in particular are run with either PowerShell Core or Windows PowerShell
81
+ - task : PowerShell@2
82
+ displayName : Test
83
+ inputs :
84
+ targetType : inline
85
+ script : |
86
+ Invoke-Build -Configuration Release Test
87
+ workingDirectory : $(Build.SourcesDirectory)/vscode-powershell
78
88
pwsh : ${{ parameters.pwsh }}
79
89
80
90
- task : PowerShell@2
87
97
Write-Host '##vso[task.LogIssue type=error;]PowerShell Editor Services bits were not built in release configuration!'
88
98
exit 1
89
99
}
90
- pwsh : ${{ parameters.pwsh }}
91
100
92
101
- publish : $(vsixPath)
93
102
artifact : vscode-powershell-vsix-$(System.JobId)
Original file line number Diff line number Diff line change 9
9
10
10
# Requires -Modules @ { ModuleName = " InvokeBuild" ; ModuleVersion = " 3.0.0" }
11
11
12
- # Sanity check our changelog version versus package.json (which lacks pre-release label)
13
- Import-Module $PSScriptRoot / tools/ VersionTools.psm1
14
- $script :Version = Get-Version - RepositoryName vscode- powershell
15
- $script :PackageVersion = Get-MajorMinorPatch - Version $Version
16
- $script :PackageJson = Get-Content - Raw $PSScriptRoot / package.json | ConvertFrom-Json
17
- Assert-Build ($script :PackageJson.version -eq $script :PackageVersion )
18
- Write-Host " `n ### Building Extension Version: $script :Version `n " - ForegroundColor Green
19
-
20
12
function Get-EditorServicesPath {
21
13
$psesRepoPath = if ($EditorServicesRepoPath ) {
22
14
$EditorServicesRepoPath
@@ -133,7 +125,14 @@ task TestEditorServices -If (Get-EditorServicesPath) {
133
125
# region Package tasks
134
126
135
127
task Package Build, {
136
- Write-Host " `n ### Packaging powershell-$script :PackageVersion .vsix`n " - ForegroundColor Green
128
+ # Sanity check our changelog version versus package.json (which lacks pre-release label)
129
+ Import-Module $PSScriptRoot / tools/ VersionTools.psm1
130
+ $version = Get-Version - RepositoryName vscode- powershell
131
+ $packageVersion = Get-MajorMinorPatch - Version $version
132
+ $packageJson = Get-Content - Raw $PSScriptRoot / package.json | ConvertFrom-Json
133
+ Assert-Build ($packageJson.version -eq $packageVersion )
134
+
135
+ Write-Host " `n ### Packaging powershell-$packageVersion .vsix`n " - ForegroundColor Green
137
136
Assert-Build ((Get-Item ./ modules).LinkType -ne " SymbolicLink" ) " Packaging requires a copy of PSES, not a symlink!"
138
137
if (Test-IsPreRelease ) {
139
138
Write-Host " `n ### This is a pre-release!`n " - ForegroundColor Green
You can’t perform that action at this time.
0 commit comments