File tree 3 files changed +15
-5
lines changed
3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 72
72
Install-Module InvokeBuild -Scope CurrentUser -Force
73
73
Install-Module platyPS -Scope CurrentUser -Force
74
74
Invoke-Build -Configuration Release
75
- Write-Host "##vso[task.setvariable variable=vsixPath]$(Resolve-Path powershell-*.vsix)"
75
+ $PackageJson = Get-Content -Raw package.json | ConvertFrom-Json
76
+ Write-Host "##vso[task.setvariable variable=vsixPath]$(Resolve-Path powershell-$($PackageJson.version).vsix)"
76
77
workingDirectory : $(Build.SourcesDirectory)/vscode-powershell
77
78
pwsh : ${{ parameters.pwsh }}
78
79
81
82
inputs :
82
83
targetType : inline
83
84
script : |
84
- $assembly = [Reflection.Assembly]::LoadFile(" $(Build.SourcesDirectory)/vscode-powershell/modules/PowerShellEditorServices.VSCode/bin/Microsoft.PowerShell.EditorServices.VSCode.dll" )
85
+ $assembly = [Reflection.Assembly]::LoadFile(' $(Build.SourcesDirectory)/vscode-powershell/modules/PowerShellEditorServices.VSCode/bin/Microsoft.PowerShell.EditorServices.VSCode.dll' )
85
86
if ($assembly.GetCustomAttributes([System.Diagnostics.DebuggableAttribute], $true).IsJITOptimizerDisabled) {
86
- Write-Host " ##vso[task.LogIssue type=error;] PowerShell Editor Services bits were not built in release configuration!"
87
+ Write-Host ' ##vso[task.LogIssue type=error;]PowerShell Editor Services bits were not built in release configuration!'
87
88
exit 1
88
89
}
89
90
pwsh : ${{ parameters.pwsh }}
Original file line number Diff line number Diff line change 6
6
displayName : Download signed artifacts
7
7
8
8
- pwsh : |
9
+ $PackageJson = Get-Content -Raw $(Build.SourcesDirectory)/package.json | ConvertFrom-Json
9
10
$(Build.SourcesDirectory)/tools/setupReleaseTools.ps1 -Token $(GitHubToken)
10
- New-DraftRelease -RepositoryName vscode-powershell -Assets $(Pipeline.Workspace)/vscode-powershell/powershell-* .vsix,$(Pipeline.Workspace)/vscode-powershell/Install-VSCode.ps1
11
+ New-DraftRelease -RepositoryName vscode-powershell -Assets $(Pipeline.Workspace)/vscode-powershell/powershell-$($PackageJson.version) .vsix,$(Pipeline.Workspace)/vscode-powershell/Install-VSCode.ps1
11
12
displayName : Drafting a GitHub Release
Original file line number Diff line number Diff line change 7
7
8
8
- pwsh : |
9
9
npm ci --loglevel=error
10
- npm run publish -- --packagePath $(Pipeline.Workspace)/vscode-powershell/powershell-*.vsix --pat $(VsceToken)
10
+ $PackageJson = Get-Content -Raw $(Build.SourcesDirectory)/package.json | ConvertFrom-Json
11
+ $PublishArgs = @(
12
+ if ($PackageJson.preview) { '--pre-release' }
13
+ '--packagePath'
14
+ "$(Pipeline.Workspace)/vscode-powershell/powershell-$($PackageJson.version).vsix"
15
+ '--pat'
16
+ '$(VsceToken)'
17
+ )
18
+ npm run publish -- @PublishArgs
11
19
displayName : Publishing VSIX to VS Code Marketplace
12
20
13
21
# NOTE: We rarely update this script, so we can ignore errors from the gallery
You can’t perform that action at this time.
0 commit comments