From 729be908914111481acacb3812bddf793e587cf8 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Mon, 11 Sep 2023 13:23:24 -0700 Subject: [PATCH 01/13] [release/v7.2.14] Add `ProductCode` in registry for MSI install (#19590) (#20233) --- assets/wix/Product.wxs | 2 ++ test/packaging/windows/msi.tests.ps1 | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index a2630f8438f..dd0117a6986 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -203,7 +203,9 @@ + + diff --git a/test/packaging/windows/msi.tests.ps1 b/test/packaging/windows/msi.tests.ps1 index 0ee34ca482c..28cedef6edd 100644 --- a/test/packaging/windows/msi.tests.ps1 +++ b/test/packaging/windows/msi.tests.ps1 @@ -144,27 +144,32 @@ Describe -Name "Windows MSI" -Fixture { Write-Verbose "cr-$channel-$runtime" -Verbose $pwshPath = Join-Path $env:ProgramFiles -ChildPath "PowerShell" $pwshx86Path = Join-Path ${env:ProgramFiles(x86)} -ChildPath "PowerShell" + $regKeyPath = "HKLM:\SOFTWARE\Microsoft\PowerShellCore\InstalledVersions" switch ("$channel-$runtime") { "preview-win7-x64" { $versionPath = Join-Path -Path $pwshPath -ChildPath '7-preview' $revisionRange = 0, 99 $msiUpgradeCode = '39243d76-adaf-42b1-94fb-16ecf83237c8' + $regKeyPath = Join-Path $regKeyPath -ChildPath $msiUpgradeCode } "stable-win7-x64" { $versionPath = Join-Path -Path $pwshPath -ChildPath '7' $revisionRange = 500, 500 $msiUpgradeCode = '31ab5147-9a97-4452-8443-d9709f0516e1' + $regKeyPath = Join-Path $regKeyPath -ChildPath $msiUpgradeCode } "preview-win7-x86" { $versionPath = Join-Path -Path $pwshx86Path -ChildPath '7-preview' $revisionRange = 0, 99 $msiUpgradeCode = '86abcfbd-1ccc-4a88-b8b2-0facfde29094' + $regKeyPath = Join-Path $regKeyPath -ChildPath $msiUpgradeCode } "stable-win7-x86" { $versionPath = Join-Path -Path $pwshx86Path -ChildPath '7' $revisionRange = 500, 500 $msiUpgradeCode = '1d00683b-0f84-4db8-a64f-2f98ad42fe06' + $regKeyPath = Join-Path $regKeyPath -ChildPath $msiUpgradeCode } default { throw "'$_' not a valid channel runtime combination" @@ -196,6 +201,27 @@ Describe -Name "Windows MSI" -Fixture { $version.Revision | Should -BeLessOrEqual $revisionRange[1] -Because "$channel revision should between $($revisionRange[0]) and $($revisionRange[1])" } + It 'MSI should add ProductCode in registry' -Skip:(!(Test-Elevated)) { + + $productCode = if ($msiUpgradeCode -eq '39243d76-adaf-42b1-94fb-16ecf83237c8' -or + $msiUpgradeCode -eq '31ab5147-9a97-4452-8443-d9709f0516e1') { + # x64 + $regKeyPath | Should -Exist + Get-ItemPropertyValue -Path $regKeyPath -Name 'ProductCode' + } elseif ($msiUpgradeCode -eq '86abcfbd-1ccc-4a88-b8b2-0facfde29094' -or + $msiUpgradeCode -eq '1d00683b-0f84-4db8-a64f-2f98ad42fe06') { + # x86 - need to open the 32bit reghive + $wow32RegKey = [Microsoft.Win32.RegistryKey]::OpenBaseKey([Microsoft.Win32.RegistryHive]::LocalMachine, [Microsoft.Win32.RegistryView]::Registry32) + $subKey = $wow32RegKey.OpenSubKey("Software\Microsoft\PowerShellCore\InstalledVersions\$msiUpgradeCode") + $subKey.GetValue("ProductCode") + } + + $productCode | Should -Not -BeNullOrEmpty + $productCodeGuid = [Guid]$productCode + $productCodeGuid | Should -BeOfType "Guid" + $productCodeGuid.Guid | Should -Not -Be $msiUpgradeCode + } + It "MSI should uninstall without error" -Skip:(!(Test-Elevated)) { { Invoke-MsiExec -Uninstall -MsiPath $msiX64Path From 5ecbec3fae34374650827cc97d5b06d18838d150 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Mon, 11 Sep 2023 13:25:14 -0700 Subject: [PATCH 02/13] [release/v7.2.14] Publish rpm package for rhel9 (#19750) (#20234) --- tools/packages.microsoft.com/mapping.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/packages.microsoft.com/mapping.json b/tools/packages.microsoft.com/mapping.json index 9ae06c5f1b8..a1ea93f4e03 100644 --- a/tools/packages.microsoft.com/mapping.json +++ b/tools/packages.microsoft.com/mapping.json @@ -14,6 +14,13 @@ ], "PackageFormat": "PACKAGE_NAME-POWERSHELL_RELEASE-1.rh.x86_64.rpm" }, + { + "url": "microsoft-rhel9.0-prod", + "distribution": [ + "stable" + ], + "PackageFormat": "PACKAGE_NAME-POWERSHELL_RELEASE-1.rh.x86_64.rpm" + }, { "url": "microsoft-rhel7.3-prod", "distribution": [ From 2af902bc6d11025957089b9a4754d50071dad435 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Mon, 11 Sep 2023 13:33:53 -0700 Subject: [PATCH 03/13] [release/v7.2.14] Don't publish notice on failure because it prevents retry (#19955) (#20236) --- .../azureDevOps/templates/compliance/generateNotice.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/releaseBuild/azureDevOps/templates/compliance/generateNotice.yml b/tools/releaseBuild/azureDevOps/templates/compliance/generateNotice.yml index 2431ded7448..777fbfb4f5d 100644 --- a/tools/releaseBuild/azureDevOps/templates/compliance/generateNotice.yml +++ b/tools/releaseBuild/azureDevOps/templates/compliance/generateNotice.yml @@ -86,4 +86,4 @@ jobs: targetPath: $(System.ArtifactsDirectory) artifactName: notice displayName: Publish notice artifacts - condition: always() + retryCountOnTaskFailure: 2 From d12a3f7bda37a5cc17c04f1ba9401e22d12bbeb4 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Mon, 11 Sep 2023 13:35:13 -0700 Subject: [PATCH 04/13] [release/v7.2.14] Update variable used to bypass the blocking check for multiple NuGet feeds (#19967) (#20237) --- .vsts-ci/linux.yml | 1 + .vsts-ci/mac.yml | 1 + .vsts-ci/windows.yml | 2 ++ .vsts-ci/windows/windows-packaging.yml | 2 ++ tools/releaseBuild/azureDevOps/vpackRelease.yml | 4 +++- 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.vsts-ci/linux.yml b/.vsts-ci/linux.yml index 8efcb91db03..77400128022 100644 --- a/.vsts-ci/linux.yml +++ b/.vsts-ci/linux.yml @@ -43,6 +43,7 @@ variables: # Avoid expensive initialization of dotnet cli, see: https://donovanbrown.com/post/Stop-wasting-time-during-NET-Core-builds DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 __SuppressAnsiEscapeSequences: 1 + nugetMultiFeedWarnLevel: none resources: - repo: self diff --git a/.vsts-ci/mac.yml b/.vsts-ci/mac.yml index 9392995ab15..e3d09def5d3 100644 --- a/.vsts-ci/mac.yml +++ b/.vsts-ci/mac.yml @@ -47,6 +47,7 @@ variables: # Turn off Homebrew analytics HOMEBREW_NO_ANALYTICS: 1 __SuppressAnsiEscapeSequences: 1 + nugetMultiFeedWarnLevel: none resources: - repo: self diff --git a/.vsts-ci/windows.yml b/.vsts-ci/windows.yml index 4386c9efed0..ebaf46e97cc 100644 --- a/.vsts-ci/windows.yml +++ b/.vsts-ci/windows.yml @@ -43,6 +43,8 @@ variables: # Avoid expensive initialization of dotnet cli, see: https://donovanbrown.com/post/Stop-wasting-time-during-NET-Core-builds DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 __SuppressAnsiEscapeSequences: 1 + NugetSecurityAnalysisWarningLevel: none + nugetMultiFeedWarnLevel: none resources: - repo: self diff --git a/.vsts-ci/windows/windows-packaging.yml b/.vsts-ci/windows/windows-packaging.yml index b413b7a639b..48e956a4d57 100644 --- a/.vsts-ci/windows/windows-packaging.yml +++ b/.vsts-ci/windows/windows-packaging.yml @@ -70,6 +70,8 @@ variables: - group: fakeNugetKey - name: SBOMGenerator_Formats value: spdx:2.2 + - name: nugetMultiFeedWarnLevel + value: none resources: repositories: diff --git a/tools/releaseBuild/azureDevOps/vpackRelease.yml b/tools/releaseBuild/azureDevOps/vpackRelease.yml index 8e58720c67b..87b26d3e6dc 100644 --- a/tools/releaseBuild/azureDevOps/vpackRelease.yml +++ b/tools/releaseBuild/azureDevOps/vpackRelease.yml @@ -15,12 +15,14 @@ variables: value: 1 - name: POWERSHELL_TELEMETRY_OPTOUT value: 1 + - name: nugetMultiFeedWarnLevel + value: none + - group: Azure Blob variable group # adds the pat to publish the vPack # instructions to create are in the description of the library - group: vPack - stages: - stage: prep displayName: Create buildInfo and name the Pipeline From 039ddd1528e9ca83628b7d69458df9abe927c6fa Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Mon, 11 Sep 2023 14:10:07 -0700 Subject: [PATCH 05/13] [release/v7.2.14] Update the link for getting started in `README.md` (#19932) (#20235) --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8febbd10567..4825eff99bf 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ It includes a command-line shell, an associated scripting language and a framewo ## Windows PowerShell vs. PowerShell Core -Although this repository started as a fork of the Windows PowerShell code base, changes made in this repository do not make their way back to Windows PowerShell 5.1 automatically. +Although this repository started as a fork of the Windows PowerShell codebase, changes made in this repository do not make their way back to Windows PowerShell 5.1 automatically. This also means that [issues tracked here][issues] are only for PowerShell Core 6 and higher. Windows PowerShell specific issues should be reported with the [Feedback Hub app][feedback-hub], by choosing "Apps > PowerShell" in category. @@ -20,7 +20,7 @@ Windows PowerShell specific issues should be reported with the [Feedback Hub app If you are new to PowerShell and would like to learn more, we recommend reviewing the [getting started][] documentation. -[getting started]: https://github.com/PowerShell/PowerShell/tree/master/docs/learning-powershell +[getting started]: https://learn.microsoft.com/powershell/scripting/learn/more-powershell-learning ## Get PowerShell @@ -34,7 +34,7 @@ You can download and install a PowerShell package for any of the following platf | [Ubuntu 18.04][corefx-linux] | [.deb][lts-ubuntu18] | [.deb][rl-ubuntu18] | [.deb][pv-deb] | [Instructions][in-ubuntu18] | | [Ubuntu 16.04][corefx-linux] | [.deb][lts-ubuntu16] | [.deb][rl-ubuntu16] | [.deb][pv-deb] | [Instructions][in-ubuntu16] | | [Debian 9][corefx-linux] | [.deb][lts-debian9] | [.deb][rl-debian9] | [.deb][pv-deb] | [Instructions][in-deb9] | -| [Debian 10][corefx-linux] | [.deb][lts-debian10] | [.deb][rl-debian10] | [.deb][pv-deb] | [Instructions][in-deb9] | +| [Debian 10][corefx-linux] | [.deb][lts-debian10] | [.deb][rl-debian10] | [.deb][pv-deb] | [Instructions][in-deb10] | | [Debian 11][corefx-linux] | | [.deb][rl-debian11] | [.deb][pv-deb] | | | [CentOS 7][corefx-linux] | [.rpm][lts-centos] | [.rpm][rl-centos] | [.rpm][pv-rpm] | [Instructions][in-centos] | | [CentOS 8][corefx-linux] | [.rpm][lts-centos8] | [.rpm][rl-centos8] | [.rpm][pv-rpm] | | @@ -240,7 +240,7 @@ License: By requesting and using the Container OS Image for Windows containers, ### Telemetry -By default, PowerShell collects the OS description and the version of PowerShell (equivalent to `$PSVersionTable.OS` and `$PSVersionTable.GitCommitId`) using [Application Insights](https://azure.microsoft.com/services/application-insights/). +By default, PowerShell collects the OS description and the version of PowerShell (equivalent to `$PSVersionTable.OS` and `$PSVersionTable.GitCommitId`) using [Application Insights](https://learn.microsoft.com/azure/azure-monitor/app/app-insights-overview). To opt-out of sending telemetry, create an environment variable called `POWERSHELL_TELEMETRY_OPTOUT` set to a value of `1` before starting PowerShell from the installed location. The telemetry we collect falls under the [Microsoft Privacy Statement](https://privacy.microsoft.com/privacystatement/). From e86cccb5837f5f64c30c0b046a1bf646cba6c3ce Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Mon, 11 Sep 2023 14:10:54 -0700 Subject: [PATCH 06/13] [release/v7.2.14] Make PR creation tool use `--web` because it is more reliable (#19944) (#20238) --- tools/releaseTools.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/releaseTools.psm1 b/tools/releaseTools.psm1 index 3c222482348..86b04ac6b50 100644 --- a/tools/releaseTools.psm1 +++ b/tools/releaseTools.psm1 @@ -824,7 +824,7 @@ function Invoke-PRBackport { } if ($PSCmdlet.ShouldProcess("Create the PR")) { - gh pr create --base $Target --title $backportTitle --body "Backport #$PrNumber" + gh pr create --base $Target --title $backportTitle --body "Backport #$PrNumber" --web } } From 5ccd7c9355ddb34496a952078d554923abb9d73a Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Mon, 11 Sep 2023 14:15:25 -0700 Subject: [PATCH 07/13] [release/v7.2.14] Remove spelling CI in favor of GitHub Action (#19973) (#20239) --- .github/CONTRIBUTING.md | 65 ++++++++++++++++-------------- .github/workflows/markdownLink.yml | 20 +++++++++ .vsts-ci/misc-analysis.yml | 49 +--------------------- .vsts-ci/misc-analysis/mdSpell.yml | 56 ------------------------- 4 files changed, 56 insertions(+), 134 deletions(-) delete mode 100644 .vsts-ci/misc-analysis/mdSpell.yml diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 04346dd9abb..2e43a299d24 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -12,8 +12,8 @@ Please read the rest of this document to ensure a smooth contribution process. * Make sure you have a [GitHub account](https://github.com/signup/free). * Learning Git: - * GitHub Help: [Good Resources for Learning Git and GitHub][good-git-resources] - * [Git Basics](../docs/git/basics.md): install and getting started + * GitHub Help: [Good Resources for Learning Git and GitHub][good-git-resources] + * [Git Basics](../docs/git/basics.md): install and getting started * [GitHub Flow Guide](https://guides.github.com/introduction/flow/): step-by-step instructions of GitHub Flow @@ -52,17 +52,17 @@ if you don't have it - `Install-Module PlatyPS`. 1. Clone the [`MicrosoftDocs/PowerShell-Docs`](https://github.com/MicrosoftDocs/PowerShell-Docs) -repo if you don't already have it. +repository if you don't already have it. 1. Start your local build of PowerShell (with the change to the cmdlet you made). -1. Find the cmdlet's markdown file in PowerShell Docs - usually under +1. Find the cmdlet's Markdown file in PowerShell Docs - usually under `PowerShell-Docs/reference///.md` (Ex. `PowerShell-Docs/reference/7/Microsoft.PowerShell.Utility/Select-String.md`) 1. Run -`Update-MarkdownHelp -Path ` +`Update-MarkdownHelp -Path ` which will update the documentation for you. 1. Make any additional changes needed for the cmdlet to be properly documented. -1. Send a Pull Request to the PowerShell Docs repo with the changes that +1. Send a Pull Request to the PowerShell Docs repository with the changes that `PlatyPS` made. 1. Link your Docs PR to your original change PR. @@ -71,35 +71,34 @@ made. * When writing Markdown documentation, use [semantic linefeeds][]. In most cases, it means "one clause/idea per line". -* Otherwise, these issues should be treated like any other issue in this repo. +* Otherwise, these issues should be treated like any other issue in this repository. #### Spellchecking documentation Documentation is spellchecked. We use the -[markdown-spellcheck](https://github.com/lukeapage/node-markdown-spellcheck) command line tool, -which can be run in interactive mode to correct typos or add words to the ignore list -(`.spelling` at the repository root). +[textlint](https://github.com/textlint/textlint/wiki/Collection-of-textlint-rule) command-line tool, +which can be run in interactive mode to correct typos. To run the spellchecker, follow these steps: * install [Node.js](https://nodejs.org/en/) (v10 or up) -* install [markdown-spellcheck](https://github.com/lukeapage/node-markdown-spellcheck) by - `npm install -g markdown-spellcheck` (v0.11.0 or up) -* run `mdspell "**/*.md" "!**/dotnet-tools/**/*.md" --ignore-numbers --ignore-acronyms --en-us`. - - The folder `dotnet-tools` is excluded because files in that folder are copied from the `dotnet/performance` repository - and will need to be synchronized from time to time. -* if the `.spelling` file is updated, commit and push it +* install [textlint](https://github.com/textlint/textlint/wiki/Collection-of-textlint-rule) by + `npm install -g textlint textlint-rule-terminology` +* run `textlint --rule terminology `, + adding `--fix` will accept all the recommendations. + +If you need to add a term or disable checking part of a file see the [configuration sections of the rule](https://github.com/sapegin/textlint-rule-terminology). #### Checking links in documentation Documentation is link-checked. We make use of the -markdown-link-check command line tool, +`markdown-link-check` command-line tool, which can be run to see if any links are dead. To run the link-checker, follow these steps: * install [Node.js](https://nodejs.org/en/) (v10 or up) -* install markdown-link-check by +* install `markdown-link-check` by `npm install -g markdown-link-check@3.8.5` * run `find . \*.md -exec markdown-link-check {} \;` @@ -177,14 +176,14 @@ Additional references: See [this][closing-via-message] for more details. * Please use the present tense and imperative mood when describing your changes: - * Instead of "Adding support for Windows Server 2012 R2", write "Add support for Windows Server 2012 R2". - * Instead of "Fixed for server connection issue", write "Fix server connection issue". + * Instead of "Adding support for Windows Server 2012 R2", write "Add support for Windows Server 2012 R2". + * Instead of "Fixed for server connection issue", write "Fix server connection issue". - This form is akin to giving commands to the code base + This form is akin to giving commands to the codebase and is recommended by the Git SCM developers. It is also used in the [Git commit messages](#common-engineering-practices). * If the change is related to a specific resource, please prefix the description with the resource name: - * Instead of "New parameter 'ConnectionCredential' in New-SqlConnection", + * Instead of "New parameter 'ConnectionCredential' in New-SqlConnection", write "New-SqlConnection: add parameter 'ConnectionCredential'". * If your change warrants an update to user-facing documentation, a Maintainer will add the `Documentation Needed` label to your PR and add an issue to the [PowerShell-Docs repository][PowerShell-Docs], @@ -195,7 +194,7 @@ Additional references: (See [Contributing to documentation related to PowerShell](#contributing-to-documentation-related-to-powershell) for more info.) * If your change adds a new source file, ensure the appropriate copyright and license headers is on top. It is standard practice to have both a copyright and license notice for each source file. - * For `.h`, `.cpp`, and `.cs` files use the copyright header with empty line after it: + * For `.h`, `.cpp`, and `.cs` files use the copyright header with empty line after it: ```c# // Copyright (c) Microsoft Corporation. @@ -203,7 +202,7 @@ Additional references: ``` - * For `.ps1` and `.psm1` files use the copyright header with empty line after it: + * For `.ps1` and `.psm1` files use the copyright header with empty line after it: ```powershell # Copyright (c) Microsoft Corporation. @@ -235,8 +234,8 @@ Additional references: * After submitting your pull request, our [CI system (Azure DevOps Pipelines)][ci-system] will run a suite of tests and automatically update the status of the pull request. -* Our CI contains automated spellchecking and link checking for markdown files. If there is any false-positive, - [run the spellchecker command line tool in interactive mode](#spellchecking-documentation) +* Our CI contains automated spellchecking and link checking for Markdown files. If there is any false-positive, + [run the spellchecker command-line tool in interactive mode](#spellchecking-documentation) to add words to the `.spelling` file. * Our packaging test may not pass and ask you to update `files.wxs` file if you add/remove/update nuget package references or add/remove assert files. @@ -280,7 +279,7 @@ Additional references: - `Approve` if you believe your feedback has been addressed or the code is fine as-is, it is customary (although not required) to leave a simple "Looks good to me" (or "LGTM") as the comment for approval. - `Comment` if you are making suggestions that the *author* does not have to accept. Early in the review, it is acceptable to provide feedback on coding formatting based on the published [Coding Guidelines][coding-guidelines], however, - after the PR has been approved, it is generally _not_ recommended to focus on formatting issues unless they go against the [Coding Guidelines][coding-guidelines]. + after the PR has been approved, it is generally *not* recommended to focus on formatting issues unless they go against the [Coding Guidelines][coding-guidelines]. Non-critical late feedback (after PR has been approved) can be submitted as a new issue or new pull request from the *reviewer*. 1. *Assignees* who are always *Maintainers* ensure that proper review has occurred and if they believe one approval is not sufficient, the *maintainer* is responsible to add more reviewers. An *assignee* may also be a reviewer, but the roles are distinct. @@ -299,7 +298,7 @@ In these cases: - If the *reviewer*'s comments are very minor, merge the change, fix the code immediately, and create a new PR with the fixes addressing the minor comments. - If the changes required to merge the pull request are significant but needed, *assignee* creates a new branch with the changes and open an issue to merge the code into the dev branch. Mention the original pull request ID in the description of the new issue and close the abandoned pull request. - - If the changes in an abandoned pull request are no longer needed (e.g. due to refactoring of the code base or a design change), *assignee* will simply close the pull request. + - If the changes in an abandoned pull request are no longer needed (e.g. due to refactoring of the codebase or a design change), *assignee* will simply close the pull request. ## Making Breaking Changes @@ -381,11 +380,17 @@ When your pull request is created, it is checked by the CLA bot. If you have signed the CLA, the status check will be set to `passing`. Otherwise, it will stay at `pending`. Once you sign a CLA, all your existing and future pull requests will have the status check automatically set at `passing`. -[testing-guidelines]: ../docs/testing-guidelines/testing-guidelines.md +## Code of Conduct Enforcement + +Reports of abuse will be reviewed by the PS-Committee and if it has been determined that violations of the +Code of Conduct has occurred, then a temporary ban may be imposed. +The duration of the temporary ban will depend on the impact and/or severity of the infraction. +This can vary from 1 day, a few days, a week, and up to 30 days. +Repeat offenses may result in a permanent ban from the PowerShell org. + [running-tests-outside-of-ci]: ../docs/testing-guidelines/testing-guidelines.md#running-tests-outside-of-ci [issue-management]: ../docs/maintainers/issue-management.md [vuln-reporting]: ./SECURITY.md -[governance]: ../docs/community/governance.md [using-prs]: https://help.github.com/articles/using-pull-requests/ [fork-a-repo]: https://help.github.com/articles/fork-a-repo/ [closing-via-message]: https://help.github.com/articles/closing-issues-via-commit-messages/ diff --git a/.github/workflows/markdownLink.yml b/.github/workflows/markdownLink.yml index 732ab5d4159..c4daa030a76 100644 --- a/.github/workflows/markdownLink.yml +++ b/.github/workflows/markdownLink.yml @@ -18,3 +18,23 @@ jobs: use-verbose-mode: 'yes' check-modified-files-only: 'yes' config-file: .github/workflows/markdown-link/config.json + markdown-lint: + permissions: + contents: read + packages: read + statuses: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + # Full git history is needed to get a proper + # list of changed files within `super-linter` + fetch-depth: 0 + - name: Lint Markdown + uses: super-linter/super-linter@v5 + env: + VALIDATE_ALL_CODEBASE: false + DEFAULT_BRANCH: master + FILTER_REGEX_INCLUDE: .*\.md + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VALIDATE_EDITORCONFIG: false diff --git a/.vsts-ci/misc-analysis.yml b/.vsts-ci/misc-analysis.yml index d1066b4701e..6487c2a1d2d 100644 --- a/.vsts-ci/misc-analysis.yml +++ b/.vsts-ci/misc-analysis.yml @@ -45,51 +45,4 @@ jobs: - checkout: ComplianceRepo - - template: ci-compliance.yml@ComplianceRepo - -- job: Linux_CI - displayName: Markdown and Common Tests - - pool: - vmImage: ubuntu-20.04 - - variables: - - name: repoPath - value: $(Agent.BuildDirectory)/$(repoFolder) - - steps: - - checkout: self - clean: true - path: $(repoFolder) - - - checkout: ComplianceRepo - - - powershell: | - Get-ChildItem -Path env: - displayName: Capture Environment - condition: succeededOrFailed() - - - powershell: | - Install-module Pester -Scope CurrentUser -Force -MaximumVersion 4.99 - displayName: Install Pester - condition: succeededOrFailed() - - - bash: | - curl -o- --progress-bar -L https://yarnpkg.com/install.sh | bash - displayName: Bootstrap Yarn - condition: succeededOrFailed() - - - bash: | - sudo yarn global add markdown-spellcheck@0.11.0 - displayName: Install mdspell - condition: succeededOrFailed() - - - bash: | - mdspell '**/*.md' '!**/Pester/**/*.md' '!**/dotnet-tools/**/*.md' --ignore-numbers --ignore-acronyms --report --en-us; - displayName: Test Spelling in Markdown - condition: succeededOrFailed() - workingDirectory: '$(repoPath)' - - - template: dailyBuildCompliance.yml@ComplianceRepo - parameters: - sourceScanPath: '$(repoPath)' + - template: ci-compliance.yml@ComplianceRepo diff --git a/.vsts-ci/misc-analysis/mdSpell.yml b/.vsts-ci/misc-analysis/mdSpell.yml deleted file mode 100644 index e9d046e5e96..00000000000 --- a/.vsts-ci/misc-analysis/mdSpell.yml +++ /dev/null @@ -1,56 +0,0 @@ -jobs: -- job: markdown - displayName: Markdown Spelling - - pool: - vmImage: ubuntu-20.04 - - variables: - - name: repoPath - value: $(Agent.BuildDirectory)/$(repoFolder) - - steps: - - checkout: self - clean: true - path: $(repoFolder) - - - checkout: ComplianceRepo - - - powershell: | - Get-ChildItem -Path env: - displayName: Capture Environment - condition: succeededOrFailed() - - - bash: | - curl -o- --progress-bar -L https://yarnpkg.com/install.sh | bash - displayName: Bootstrap Yarn - condition: succeededOrFailed() - - - bash: | - sudo yarn global add markdown-spellcheck@0.11.0 - displayName: Install mdspell - condition: succeededOrFailed() - - - bash: | - mdspell '**/*.md' '!**/Pester/**/*.md' '!**/dotnet-tools/**/*.md' --ignore-numbers --ignore-acronyms --report --en-us; - displayName: Test Spelling in Markdown - condition: succeededOrFailed() - workingDirectory: '$(repoPath)' - - - ${{ if not(contains(variables['SYSTEM.COLLECTIONURI'],'mscodehub')) }}: - - pwsh: | - Import-module ./build.psm1 - $path = Join-Path -Path $pwd -ChildPath './commonTestResults.xml' - $results = invoke-pester -Script ./test/common/markdown-lint -OutputFile $path -OutputFormat NUnitXml -PassThru - Write-Host "##vso[results.publish type=NUnit;mergeResults=true;runTitle=Markdown Lint;publishRunAttachments=true;resultFiles=$path;]" - if($results.TotalCount -eq 0 -or $results.FailedCount -gt 0) - { - throw "Markdown tests failed" - } - displayName: Run Markdown Lint Tests - condition: succeededOrFailed() - workingDirectory: '$(repoPath)' - - - template: dailyBuildCompliance.yml@ComplianceRepo - parameters: - sourceScanPath: '$(repoPath)/test/common' From ef4fd9aa41174ad61ae239ac2480e21ee22d8627 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Mon, 11 Sep 2023 14:16:17 -0700 Subject: [PATCH 08/13] [release/v7.2.14] Update man page to match current help for pwsh (#19993) (#20240) --- assets/pwsh.1.ronn | 210 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 159 insertions(+), 51 deletions(-) diff --git a/assets/pwsh.1.ronn b/assets/pwsh.1.ronn index bcc38f7b8b0..13126164551 100644 --- a/assets/pwsh.1.ronn +++ b/assets/pwsh.1.ronn @@ -3,11 +3,17 @@ pwsh(1) -- PowerShell command-line shell and .NET REPL ## SYNOPSIS -`pwsh` [`-NoLogo`] [`-NoExit`] [`-NoProfile`] [`-NonInteractive`] -[`-InputFormat` {Text | XML}] [`-OutputFormat` {Text | XML}] +`pwsh` [`-Login`] [ [`-File`] [args] ] +[`-Command` { - | [`-args` ] | +[] } ] [`-ConfigurationFile` ] +[`-ConfigurationName` ] [`-CustomPipeName` ] +[`-EncodedArguments` ] [`-EncodedCommand` ] -[`-File` ] [`-ExecutionPolicy` ] -[`-Command` { `-` | [`-args` ] | [] } ] +[`-ExecutionPolicy` ] [`-Help`] [`-InputFormat` {Text | XML}] +[`-Interactive`] [`-MTA`] [`-NoExit`] [`-NoLogo`] [`-NonInteractive`] +[`-NoProfile`] [`-NoProfileLoadTime`] [`-OutputFormat` {Text | XML}] +[`-SettingsFile` ] [`-SSHServerMode`] [`-STA`] [`-Version`] +[`-WindowStyle`