From 6cc3900463550415087f88222dc9159c7f63b498 Mon Sep 17 00:00:00 2001 From: Andy Jordan <2226434+andyleejordan@users.noreply.github.com> Date: Wed, 3 Apr 2024 14:04:58 -0700 Subject: [PATCH 1/3] Fix `updateVersion.ps1` --- tools/updateVersion.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/updateVersion.ps1 b/tools/updateVersion.ps1 index 5a7d586be5..dd007486df 100644 --- a/tools/updateVersion.ps1 +++ b/tools/updateVersion.ps1 @@ -14,16 +14,16 @@ if ($LASTEXITCODE -ne 0) { throw "There are staged changes in the repository. Please commit or reset them before running this script." } -if ($SemanticVersion.Major -ne $(Get-Date).Year) { +if ($Version.Major -ne $(Get-Date).Year) { throw "Major version should be the current year!" } -if ($SemanticVersion.PreReleaseLabel) { - if ($SemanticVersion.Minor % 2 -eq 0) { +if ($Version.PreReleaseLabel) { + if ($Version.Minor % 2 -eq 0) { throw "Minor version must be odd for pre-release!" } } else { - if ($SemanticVersion.Minor % 2 -ne 0) { + if ($Version.Minor % 2 -ne 0) { throw "Minor version must be even for pre-release!" } } From e27cd6610d9f9fc67785370eb05b41739491fae4 Mon Sep 17 00:00:00 2001 From: Andy Jordan <2226434+andyleejordan@users.noreply.github.com> Date: Wed, 3 Apr 2024 15:20:55 -0700 Subject: [PATCH 2/3] Fix OneBranch pipeline I mindlessly copied the old pipeline's logic and had it building from the Git repository. However, weirdly the NuGet authentication stopped working, and it was a better fix to test against the same artifact that we're going to release. We also have to release from the `main` branch due to _reasons_, and this was actually fortunate as I noticed I'd made a mistake with the VSIX artifact names (they're not prefixed with `vscode-`). --- .pipelines/vscode-powershell-Official.yml | 31 ++++++++++++++--------- docs/development.md | 12 +++++++-- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/.pipelines/vscode-powershell-Official.yml b/.pipelines/vscode-powershell-Official.yml index 035d04c2ea..f54b832d0c 100644 --- a/.pipelines/vscode-powershell-Official.yml +++ b/.pipelines/vscode-powershell-Official.yml @@ -27,16 +27,12 @@ resources: type: git name: OneBranch.Pipelines/GovernedTemplates ref: refs/heads/main - - repository: PowerShellEditorServices - type: git - name: PowerShellEditorServices - ref: release pipelines: - pipeline: PowerShellEditorServices-Official source: PowerShellEditorServices-Official trigger: branches: - - release + - main extends: # https://aka.ms/obpipelines/templates @@ -126,8 +122,6 @@ extends: ob_outputDirectory: $(Build.SourcesDirectory)/out skipComponentGovernanceDetection: true steps: - - checkout: self - - checkout: PowerShellEditorServices - task: UseNode@1 displayName: Use Node 18.x inputs: @@ -135,7 +129,7 @@ extends: - task: npmAuthenticate@0 displayName: Authenticate NPM with Azure Artifacts inputs: - workingFile: vscode-powershell/.npmrc + workingFile: .npmrc - task: UseDotNet@2 displayName: Use .NET 8.x SDK inputs: @@ -145,10 +139,23 @@ extends: displayName: Install PSResources inputs: pwsh: true - filePath: vscode-powershell/tools/installPSResources.ps1 + filePath: tools/installPSResources.ps1 + - task: DownloadPipelineArtifact@2 + displayName: Download PowerShellEditorServices + inputs: + source: specific + project: PowerShellCore + definition: 2905 + specificBuildWithTriggering: true + artifact: drop_release_github + itemPattern: PowerShellEditorServices.zip + - task: ExtractFiles@1 + displayName: Extract PowerShellEditorServices module + inputs: + archiveFilePatterns: $(Pipeline.Workspace)/PowerShellEditorServices.zip + destinationFolder: $(Build.SourcesDirectory)/modules - pwsh: Invoke-Build Test -Configuration $(BuildConfiguration) displayName: Run tests - workingDirectory: vscode-powershell - stage: release dependsOn: build variables: @@ -171,7 +178,7 @@ extends: inputs: gitHubConnection: GitHub repositoryName: PowerShell/vscode-powershell - assets: $(drop)/vscode-powershell-$(vsixVersion).vsix + assets: $(drop)/powershell-$(vsixVersion).vsix tagSource: userSpecifiedTag tag: v$(version) isDraft: true @@ -214,7 +221,7 @@ extends: '--pat' '$(token)' '--packagePath' - '$(drop)/vscode-powershell-$(vsixVersion).vsix' + '$(drop)/powershell-$(vsixVersion).vsix' if ([bool]::Parse('$(prerelease)')) { '--pre-release' } ) npm run publish -- @publishArgs diff --git a/docs/development.md b/docs/development.md index b800ec00e0..5cac5bcf9e 100644 --- a/docs/development.md +++ b/docs/development.md @@ -52,20 +52,24 @@ For more information on contributing snippets please read our These are the current steps for creating a release for both the editor services and the extension. Azure DevOps access is restricted to Microsoft employees and is used to sign and validate the produced binaries before publishing on behalf -of Microsoft. +of Microsoft. Assume `origin` is GitHub and `ado` is Azure DevOps. ```powershell cd ./PowerShellEditorServices git checkout -B release ./tools/updateVersion.ps1 -Version "4.0.0" -Changes "Major release!" +git push --force-with-lease origin +git push ado HEAD:main cd ../vscode-powershell git checkout -B release ./tools/updateVersion.ps1 -Version "2024.4.0" -Changes "Major release!" +git push --force-with-lease origin +git push ado HEAD:main ``` 1. Amend changelogs as necessary. -2. Push release branches to ADO and GitHub. +2. Push `release` branches to GitHub and to Azure DevOps `main` branch. 3. Download and test assets! 4. Publish draft releases and merge (don't squash!) branches. 5. Permit pipeline to publish to marketplace. @@ -74,6 +78,10 @@ If rolling from pre-release to release, do not change the version of PowerShell Editor Services between a pre-release and the subsequent release! We only need to release the extension. +The Azure DevOps pipelines have to build off `main` branch for _reasons_, +but we still want to use PRs. Hence pushing `release` to `main` and then +merging (not squashing nor rebasing) those PRs so the commit stays the same. + ### Versioning For both our repositories we use Git tags in the form `vX.Y.Z` to mark the releases in the From 007148e7d1d4c8ca37244a86e54bf1c604f4c66b Mon Sep 17 00:00:00 2001 From: Andy Jordan <2226434+andyleejordan@users.noreply.github.com> Date: Wed, 3 Apr 2024 14:05:01 -0700 Subject: [PATCH 3/3] v2024.3.2-preview: Overhauled Terminal Shell Integration! --- CHANGELOG.md | 9 +++++++++ package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3131b9200a..eeac38b001 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # PowerShell Extension Release History +## v2024.3.2-preview +### Wednesday, April 03, 2024 + +With PowerShell Editor Services [v3.19.0](https://github.com/PowerShell/PowerShellEditorServices/releases/tag/v3.19.0)! + +Overhauled Terminal Shell Integration! + +See more details at the GitHub Release for [v2024.3.2-preview](https://github.com/PowerShell/vscode-powershell/releases/tag/v2024.3.2-preview). + ## v2024.3.1-preview ### Tuesday, March 5, 2024 diff --git a/package.json b/package.json index a4ccbfc615..d1f33058ba 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "powershell", "displayName": "PowerShell", - "version": "2024.3.1", + "version": "2024.3.2", "preview": false, "publisher": "ms-vscode", "description": "Develop PowerShell modules, commands and scripts in Visual Studio Code!",