Skip to content

Fix Package task #3439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 29, 2021
Merged

Fix Package task #3439

merged 2 commits into from
Jun 29, 2021

Conversation

andyleejordan
Copy link
Member

@andyleejordan andyleejordan commented Jun 24, 2021

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.

This also fixes the path to InvokePesterStub.ps1 which is now part of the
PowerShellEditorServices repository. This was necessary in order to sign it, as
it must be signed before the VSIX is created. Moving it to the other repo was
the best way to solve the "chicken-egg" problem that presented.

Resolves #3293 and combined with PowerShell/PowerShellEditorServices#1513, resolves #2536.

@andyleejordan andyleejordan requested a review from rjmholt June 24, 2021 21:04
@andyleejordan andyleejordan force-pushed the andschwa/package-fix branch 2 times, most recently from e18f5ee to 656fb35 Compare June 24, 2021 23:14
@ghost ghost added Area-Build & Release Issue-Enhancement A feature request (enhancement). labels Jun 24, 2021
@andyleejordan andyleejordan force-pushed the andschwa/package-fix branch from 656fb35 to b457f4e Compare June 24, 2021 23:22
@andyleejordan andyleejordan changed the title WIP: Fix Package task Fix Package task Jun 24, 2021
@andyleejordan andyleejordan marked this pull request as ready for review June 24, 2021 23:22
@andyleejordan
Copy link
Member Author

@rjmholt Running a "release" to see if everything still works.

@andyleejordan andyleejordan linked an issue Jun 24, 2021 that may be closed by this pull request
@andyleejordan
Copy link
Member Author

Oof, ok so this doesn't quite work. It's a chicken-egg problem. We need InvokePesterStub.ps1 signed before the build happens, so that it can go into the resulting VSIX, which itself then needs signing. Grr.

@andyleejordan andyleejordan force-pushed the andschwa/package-fix branch from b457f4e to 4bcbdb2 Compare June 25, 2021 19:20
@ghost ghost added the Issue-Bug A bug to squash. label Jun 25, 2021
@andyleejordan andyleejordan force-pushed the andschwa/package-fix branch 2 times, most recently from ecfca5f to d58815d Compare June 25, 2021 19:57
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.
This fixes the path to the script which is now part of the
`PowerShellEditorServices` repository. This was necessary in order to sign it,
as it must be signed _before_ the VSIX is created. Moving it to the other repo
was the best way to solve the "chicken-egg" problem that presented.
@andyleejordan andyleejordan force-pushed the andschwa/package-fix branch from d58815d to 00da48b Compare June 25, 2021 20:04
@andyleejordan
Copy link
Member Author

@andys-mac-mini ~/src/vscode-powershell andschwa/package-fix ≡
> . '/Users/andschwa/.vscode/extensions/ms-vscode.powershell-2021.6.2/modules/PowerShellEditorServices/InvokePesterStub.ps1' -ScriptPath '/Users/andschwa/src/PowerShellEditorServices/test/PowerShellEditorServices.Test.Shared/Symbols/PesterFile.tests.ps1' -All -Output 'FromPreference'

Importing Pester module...
WARNING: Failed to import Pester. You must install Pester module to run or debug Pester tests.
WARNING: You can install Pester by executing: Install-Module Pester -Scope CurrentUser -Force
PS> Install-Module Pester -Scope CurrentUser -Force

@andys-mac-mini ...itorServices.Test.Shared/Symbols andschwa/import-pester-stub ≡                                                            > . '/Users/andschwa/.vscode/extensions/ms-vscode.powershell-2021.6.2/modules/PowerShellEditorServices/InvokePesterStub.ps1' -ScriptPath '/Users/andschwa/src/PowerShellEditorServices/test/PowerShellEditorServices.Test.Shared/Symbols/PesterFile.tests.ps1' -All -Output 'FromPreference'                                                                                                                                                                                                                                                                                        
Importing Pester module...

Starting discovery in 1 files.
Discovery finished in 188ms.
Running tests.
[+] /Users/andschwa/src/PowerShellEditorServices/test/PowerShellEditorServices.Test.Shared/Symbols/PesterFile.tests.ps1 507ms (33ms|317ms)
Tests completed in 528ms
Tests Passed: 3, Failed: 0, Skipped: 0 NotRun: 0
PS> 

@andyleejordan andyleejordan removed the Issue-Bug A bug to squash. label Jun 25, 2021
@andyleejordan andyleejordan added this to the Committed-vNext milestone Jun 25, 2021
@andyleejordan andyleejordan merged commit b4a01e7 into master Jun 29, 2021
@andyleejordan andyleejordan deleted the andschwa/package-fix branch June 29, 2021 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Build & Release Issue-Enhancement A feature request (enhancement).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Name built VSIX with version instead of -insiders PowerShell extension - Not signed PowerShell-Files
2 participants