From f02d0d89eb7bbf92dd72b50383d8edd9c6646f55 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Thu, 15 Jul 2021 14:35:10 -0700 Subject: [PATCH 1/5] Fix adding "Ignore" label to new release PRs --- tools/ReleaseTools.psm1 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/ReleaseTools.psm1 b/tools/ReleaseTools.psm1 index 907be306e8..5a0b227384 100644 --- a/tools/ReleaseTools.psm1 +++ b/tools/ReleaseTools.psm1 @@ -365,13 +365,9 @@ function New-ReleasePR { git push origin $Branch } - $LabelParams = @{ - OwnerName = "PowerShell" - RepositoryName = $RepositoryName - Label = "Ignore" - } + $Repo = Get-GitHubRepository -OwnerName PowerShell -RepositoryName $RepositoryName - $PRParams = @{ + $Params = @{ Head = $Branch Base = "master" Draft = $true @@ -381,9 +377,13 @@ function New-ReleasePR { Confirm = $ConfirmPreference } - $PR = Get-GitHubLabel @LabelParams | New-GitHubPullRequest @PRParams + $PR = $Repo | New-GitHubPullRequest @Params Write-Host "Draft PR URL: $($PR.html_url)" + # NOTE: The API is weird. According to GitHub, all PRs are Issues, so this + # works, but the module doesn't support it as easily as it could. + $Repo | Add-GitHubIssueLabel -Issue $PR.PullRequestNumber -LabelName "Ignore" + Pop-Location } From be7f5c0c854d39c34fa4df033688a1c2aea21c07 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Thu, 15 Jul 2021 14:14:01 -0700 Subject: [PATCH 2/5] Update CHANGELOG for `v2021.7.0-preview` --- CHANGELOG.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index db2cec73dc..5f977f47ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # PowerShell Extension Release History +## v2021.7.0-preview +### Thursday, July 15, 2021 + +#### [vscode-powershell](https://github.com/PowerShell/vscode-powershell) + +- ✨ 👷 [vscode-powershell #3458](https://github.com/PowerShell/vscode-powershell/pull/3458) - Automate more of the release. +- ✨ 👷 [vscode-powershell #3439](https://github.com/PowerShell/vscode-powershell/pull/3439) - Fix `Package` task. + +#### [PowerShellEditorServices](https://github.com/PowerShell/PowerShellEditorServices) + +- ✨ 🚨 [PowerShellEditorServices #1522](https://github.com/PowerShell/PowerShellEditorServices/pull/1522) - Run new PSReadLine test on Windows. +- ✨ 📖 [PowerShellEditorServices #1519](https://github.com/PowerShell/PowerShellEditorServices/pull/1519) - Update README.md. (Thanks @vladdoster!) +- ✨ 🙏 [PowerShellEditorServices #1493](https://github.com/PowerShell/PowerShellEditorServices/pull/1514) - Load only bundled `PSReadLine`. +- 🐛 👷 [PowerShellEditorServices #1513](https://github.com/PowerShell/PowerShellEditorServices/pull/1513) - Import `InvokePesterStub.ps1` from `vscode-powershell` (with history). +- 🐛 🛫 [PowerShellEditorServices #1503](https://github.com/PowerShell/PowerShellEditorServices/pull/1504) - Handle `incomingSettings` and `profileObject` being null. (Thanks @dkattan!) + + ## v2021.6.2 ### Thursday, June 24, 2021 From 5b0cd7cec050d5a90886d976ad1b7d1d324e7d60 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Thu, 15 Jul 2021 14:14:02 -0700 Subject: [PATCH 3/5] Bump version to `v2021.7.0-preview` --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 00d1add32c..6656c5c367 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { - "name": "powershell", - "displayName": "PowerShell", - "version": "2021.6.2", - "preview": false, + "name": "powershell-preview", + "displayName": "PowerShell Preview", + "version": "2021.7.0", + "preview": true, "publisher": "ms-vscode", - "description": "Develop PowerShell modules, commands and scripts in Visual Studio Code!", + "description": "(Preview) Develop PowerShell modules, commands and scripts in Visual Studio Code!", "engines": { "vscode": "^1.53.0" }, From 55b98bd1d5a45faf4f57d7fdd7297646038b6c91 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Thu, 15 Jul 2021 15:02:46 -0700 Subject: [PATCH 4/5] Update project and pipeline id for ADO move --- .vsts-ci/templates/release-general.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.vsts-ci/templates/release-general.yml b/.vsts-ci/templates/release-general.yml index 25398a01f3..47220e3dc3 100644 --- a/.vsts-ci/templates/release-general.yml +++ b/.vsts-ci/templates/release-general.yml @@ -10,8 +10,8 @@ steps: displayName: 'Download Artifacts from PowerShellEditorServices' inputs: source: specific - project: '8e2735c1-3674-408a-bcab-87f089ea29d5' - pipeline: 1056 + project: 'PowerShellEditorServices' + pipeline: 36 preferTriggeringPipeline: true allowPartiallySucceededBuilds: true artifact: 'PowerShellEditorServices' From fb570b5fd99ecdc13057f5247c37edb64debc14c Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Thu, 15 Jul 2021 15:58:35 -0700 Subject: [PATCH 5/5] Fix bug when uploading release assets --- tools/ReleaseTools.psm1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/ReleaseTools.psm1 b/tools/ReleaseTools.psm1 index 5a0b227384..b3719dd2a1 100644 --- a/tools/ReleaseTools.psm1 +++ b/tools/ReleaseTools.psm1 @@ -424,7 +424,10 @@ function New-DraftRelease { $Release = New-GitHubRelease @ReleaseParams if ($Release) { Write-Host "Draft release URL: $($Release.html_url)" + # NOTE: We must loop around `New-GitHubReleaseAsset` so we can pipe + # `$Release` or it can fail to find the newly created release by its ID + # (probably a race condition). Write-Host "Uploading assets..." - $Assets | New-GitHubReleaseAsset -Release $Release.Id + $Assets | ForEach-Object { $Release | New-GitHubReleaseAsset -Path $_ } } }