Skip to content

Commit b4a01e7

Browse files
Merge pull request #3439 from PowerShell/andschwa/package-fix
Fix `Package` task
2 parents 465058f + 00da48b commit b4a01e7

File tree

5 files changed

+8
-210
lines changed

5 files changed

+8
-210
lines changed

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

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ steps:
4242
# NOTE: Code AKA *.vsix files are not signed
4343
pattern: |
4444
Install-VSCode.ps1
45-
InvokePesterStub.ps1
4645
4746
- template: EsrpScan.yml@ComplianceRepo
4847
parameters:

InvokePesterStub.ps1

-192
This file was deleted.

docs/development.md

-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ Update-Version -RepositoryName vscode-powershell
7373
# Push branches to GitHub and ADO
7474
# Open PRs for review
7575
# Download and test assets (assert correct PSES is included)
76-
# Rename VSIX correctly
7776
New-DraftRelease -RepositoryName PowerShellEditorServices
7877
New-DraftRelease -RepositoryName vscode-powershell
7978
# Point releases to branches for automatic tagging

src/features/PesterTests.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class PesterTestsFeature implements vscode.Disposable {
1818
private invokePesterStubScriptPath: string;
1919

2020
constructor(private sessionManager: SessionManager) {
21-
this.invokePesterStubScriptPath = path.resolve(__dirname, "../../../InvokePesterStub.ps1");
21+
this.invokePesterStubScriptPath = path.resolve(__dirname, "../../../modules/PowerShellEditorServices/InvokePesterStub.ps1");
2222

2323
// File context-menu command - Run Pester Tests
2424
this.command = vscode.commands.registerCommand(

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)