Skip to content

Commit 5e4f8d8

Browse files
committed
Fix Package task
This now leaves the VSIX named as `vsce` creates it: `powershell-YYYY.MM.X.vsix`, instead of renaming it `PowerShell-Insiders.vsix`. I can't think of anything this would break, since the upload is not actually done with the deleted `Upload` task but with an ADO pipeline task.
1 parent e287947 commit 5e4f8d8

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

vscode-powershell.build.ps1

+7-15
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,6 @@ task ResolveEditorServicesPath -Before CleanEditorServices, BuildEditorServices,
3636
}
3737
}
3838

39-
task UploadArtifacts {
40-
if ($env:TF_BUILD) {
41-
# SYSTEM_PHASENAME is the Job name.
42-
Copy-Item -Path PowerShell-insiders.vsix `
43-
-Destination "$env:BUILD_ARTIFACTSTAGINGDIRECTORY/$($script:PackageJson.name)-$($script:PackageJson.version)-$env:SYSTEM_PHASENAME.vsix"
44-
}
45-
}
46-
4739
#endregion
4840
#region Restore tasks
4941

@@ -145,15 +137,15 @@ task Package UpdateReadme, {
145137
throw "Unable to find PowerShell EditorServices"
146138
}
147139

148-
Write-Host "`n### Packaging PowerShell-insiders.vsix`n" -ForegroundColor Green
140+
$packageName = "$($script:PackageJson.name)-$($script:PackageJson.version).vsix"
141+
Write-Host "`n### Packaging $packageName`n" -ForegroundColor Green
149142
exec { & node ./node_modules/vsce/out/vsce package --no-gitHubIssueLinking }
150143

151-
# Change the package to have a static name for automation purposes
152-
Move-Item -Force .\$($script:PackageJson.name)-$($script:PackageJson.version).vsix .\PowerShell-insiders.vsix
153-
154144
if ($env:TF_BUILD) {
155-
Copy-Item -Verbose -Recurse "./PowerShell-insiders.vsix" "$env:BUILD_ARTIFACTSTAGINGDIRECTORY/vscode-powershell/PowerShell-insiders.vsix"
156-
Copy-Item -Verbose -Recurse "./scripts/Install-VSCode.ps1" "$env:BUILD_ARTIFACTSTAGINGDIRECTORY/vscode-powershell/Install-VSCode.ps1"
145+
$artifactsPath = "$env:BUILD_ARTIFACTSTAGINGDIRECTORY/vscode-powershell/"
146+
"./$packageName", "./scripts/Install-VSCode.ps1" | ForEach-Object {
147+
Copy-Item -Verbose -Recurse $_ $artifactsPath
148+
}
157149
}
158150
}
159151

@@ -162,4 +154,4 @@ task Package UpdateReadme, {
162154
# The set of tasks for a release
163155
task Release Clean, Build, Package
164156
# The default task is to run the entire CI build
165-
task . CleanAll, BuildAll, Test, Package, UploadArtifacts
157+
task . CleanAll, BuildAll, Test, Package

0 commit comments

Comments
 (0)