diff --git a/.config/tsaoptions.json b/.config/tsaoptions.json new file mode 100644 index 000000000..28761179f --- /dev/null +++ b/.config/tsaoptions.json @@ -0,0 +1,8 @@ +{ + "instanceUrl": "https://msazure.visualstudio.com", + "projectName": "One", + "areaPath": "One\\MGMT\\Compute\\Powershell\\Powershell", + "notificationAliases": [ "andschwa@microsoft.com", "slee@microsoft.com" ], + "codebaseName": "PowerShell_PowerShellEditorServices_20240313", + "tools": [ "CredScan", "PoliCheck", "BinSkim" ] +} diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 000000000..bb7a942a4 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,16 @@ +changelog: + exclude: + labels: + - Ignore + authors: + - dependabot[bot] + categories: + - title: Enhancements & Features ✨ + labels: + - Issue-Enhancement + - title: Squashed Bugs 🐛 + labels: + - Issue-Bug + - title: Other Changes 🙏 + labels: + - "*" diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 934962034..fd93eb384 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -37,6 +37,9 @@ jobs: 6.0.x 7.0.x 8.0.x + source-url: https://pkgs.dev.azure.com/mscodehub/PowerShellCore/_packaging/PowerShellCore_PublicPackages/nuget/v3/index.json + env: + NUGET_AUTH_TOKEN: ${{ secrets.AZURE_NUGET_TOKEN }} - name: Install PSResources shell: pwsh diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 152ff2df8..018eaaa77 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -33,6 +33,9 @@ jobs: with: cache: true cache-dependency-path: '**/packages.lock.json' + source-url: https://pkgs.dev.azure.com/mscodehub/PowerShellCore/_packaging/PowerShellCore_PublicPackages/nuget/v3/index.json + env: + NUGET_AUTH_TOKEN: ${{ secrets.AZURE_NUGET_TOKEN }} - name: Initialize CodeQL uses: github/codeql-action/init@v3 diff --git a/.github/workflows/emacs-test.yml b/.github/workflows/emacs-test.yml index d5c51de0e..31f840581 100644 --- a/.github/workflows/emacs-test.yml +++ b/.github/workflows/emacs-test.yml @@ -27,6 +27,9 @@ jobs: with: cache: true cache-dependency-path: '**/packages.lock.json' + source-url: https://pkgs.dev.azure.com/mscodehub/PowerShellCore/_packaging/PowerShellCore_PublicPackages/nuget/v3/index.json + env: + NUGET_AUTH_TOKEN: ${{ secrets.AZURE_NUGET_TOKEN }} - name: Install PSResources shell: pwsh diff --git a/.github/workflows/vim-test.yml b/.github/workflows/vim-test.yml index 76e5c5095..b434fcb45 100644 --- a/.github/workflows/vim-test.yml +++ b/.github/workflows/vim-test.yml @@ -27,6 +27,9 @@ jobs: with: cache: true cache-dependency-path: '**/packages.lock.json' + source-url: https://pkgs.dev.azure.com/mscodehub/PowerShellCore/_packaging/PowerShellCore_PublicPackages/nuget/v3/index.json + env: + NUGET_AUTH_TOKEN: ${{ secrets.AZURE_NUGET_TOKEN }} - name: Install PSResources shell: pwsh diff --git a/.pipelines/PowerShellEditorServices-Official.yml b/.pipelines/PowerShellEditorServices-Official.yml new file mode 100644 index 000000000..f1d47c08c --- /dev/null +++ b/.pipelines/PowerShellEditorServices-Official.yml @@ -0,0 +1,182 @@ +################################################################################# +# OneBranch Pipelines # +# This pipeline was created by EasyStart from a sample located at: # +# https://aka.ms/obpipelines/easystart/samples # +# Documentation: https://aka.ms/obpipelines # +# Yaml Schema: https://aka.ms/obpipelines/yaml/schema # +# Retail Tasks: https://aka.ms/obpipelines/tasks # +# Support: https://aka.ms/onebranchsup # +################################################################################# + +trigger: none + +parameters: +- name: debug + displayName: Enable debug output + type: boolean + default: false + +variables: + system.debug: ${{ parameters.debug }} + BuildConfiguration: Release + WindowsContainerImage: onebranch.azurecr.io/windows/ltsc2019/vse2022:latest + DOTNET_NOLOGO: true + DOTNET_CLI_TELEMETRY_OPTOUT: true + DOTNET_GENERATE_ASPNET_CERTIFICATE: false + +resources: + repositories: + - repository: templates + type: git + name: OneBranch.Pipelines/GovernedTemplates + ref: refs/heads/main + +extends: + # https://aka.ms/obpipelines/templates + template: v2/OneBranch.Official.CrossPlat.yml@templates + parameters: + globalSdl: # https://aka.ms/obpipelines/sdl + asyncSdl: + enabled: true + forStages: [build] + stages: + - stage: build + jobs: + - job: main + displayName: Build package + pool: + type: windows + variables: + ob_outputDirectory: $(Build.SourcesDirectory)/module + steps: + - pwsh: | + [xml]$xml = Get-Content PowerShellEditorServices.Common.props + $version = $xml.Project.PropertyGroup.VersionPrefix + Write-Output "##vso[task.setvariable variable=version;isOutput=true]$version" + name: package + displayName: Get version from project properties + - task: onebranch.pipeline.version@1 + displayName: Set OneBranch version + inputs: + system: Custom + customVersion: $(package.version) + - task: UseDotNet@2 + displayName: Install .NET 8.x SDK + inputs: + packageType: sdk + version: 8.x + - task: UseDotNet@2 + displayName: Install .NET 7.x runtime + inputs: + packageType: runtime + version: 7.x + - task: UseDotNet@2 + displayName: Install .NET 6.x runtime + inputs: + packageType: runtime + version: 6.x + - task: PowerShell@2 + displayName: Install PSResources + inputs: + pwsh: true + filePath: tools/installPSResources.ps1 + - task: PowerShell@2 + displayName: Build and test + inputs: + targetType: inline + pwsh: true + script: Invoke-Build TestFull -Configuration $(BuildConfiguration) + - task: PublishTestResults@2 + displayName: Publish test results + inputs: + testRunner: VSTest + testResultsFiles: '**/*.trx' + failTaskOnFailedTests: true + - task: PowerShell@2 + displayName: Assert release configuration + inputs: + targetType: inline + pwsh: true + script: | + $assembly = [Reflection.Assembly]::LoadFile("$(Build.SourcesDirectory)/module/PowerShellEditorServices/bin/Core/Microsoft.PowerShell.EditorServices.Hosting.dll") + if ($assembly.GetCustomAttributes([System.Diagnostics.DebuggableAttribute], $true).IsJITOptimizerDisabled) { + Write-Host "##vso[task.LogIssue type=error;]Was not built in release configuration!" + exit 1 + } + - task: onebranch.pipeline.signing@1 + displayName: Sign 1st-party files + inputs: + command: sign + signing_environment: external_distribution + search_root: $(Build.SourcesDirectory)/module + files_to_sign: | + **/*.ps1; + **/*.psd1; + **/*.psm1; + **/*.ps1xml; + **/Microsoft.PowerShell.EditorServices*.dll; + !Plaster/*; + - task: onebranch.pipeline.signing@1 + displayName: Sign 3rd-party files + inputs: + command: sign + signing_environment: 135020002 + search_root: $(Build.SourcesDirectory)/module + files_to_sign: | + **/MediatR.dll; + **/Nerdbank.Streams.dll; + **/Newtonsoft.Json.dll; + **/OmniSharp.Extensions*.dll; + **/Serilog*.dll; + **/System.Reactive.dll; + Plaster/**/*.ps1; + Plaster/**/*.psd1; + Plaster/**/*.psm1; + - stage: release + dependsOn: build + variables: + version: $[ stageDependencies.build.main.outputs['package.version'] ] + drop: $(Pipeline.Workspace)/drop_build_main + jobs: + - job: validation + displayName: Manual validation + pool: + type: agentless + timeoutInMinutes: 1440 + steps: + - task: ManualValidation@0 + displayName: Wait 24 hours for validation + inputs: + notifyUsers: $(Build.RequestedForEmail) + instructions: Please validate the release + timeoutInMinutes: 1440 + - job: github + dependsOn: validation + displayName: Publish draft to GitHub + pool: + type: windows + variables: + ob_outputDirectory: $(Build.SourcesDirectory)/out + steps: + - download: current + displayName: Download artifacts + - task: ArchiveFiles@2 + displayName: Zip signed artifacts + inputs: + rootFolderOrFile: $(drop) + includeRootFolder: false + archiveType: zip + archiveFile: out/PowerShellEditorServices.zip + - task: GitHubRelease@1 + displayName: Create GitHub release + inputs: + gitHubConnection: GitHub + repositoryName: PowerShell/PowerShellEditorServices + assets: out/PowerShellEditorServices.zip + tagSource: userSpecifiedTag + tag: v$(version) + isDraft: true + addChangeLog: false + releaseNotesSource: inline + releaseNotesInline: | + # TODO: Generate release notes on GitHub! diff --git a/.vsts-ci/azure-pipelines-ci.yml b/.vsts-ci/azure-pipelines-ci.yml deleted file mode 100644 index 325009518..000000000 --- a/.vsts-ci/azure-pipelines-ci.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: CI-$(Build.SourceBranchName)-$(Date:yyyyMMdd)$(Rev:.rr) - -# NOTE: This was superceded by the GitHub Actions workflow. -pr: none -trigger: none - -variables: - # Don't download unneeded packages - - name: DOTNET_NOLOGO - value: 'true' - # Improve performance by not sending telemetry - - name: DOTNET_CLI_TELEMETRY_OPTOUT - value: 'true' - # Improve performance by not generating certificates - - name: DOTNET_GENERATE_ASPNET_CERTIFICATE - value: 'false' - -jobs: -- job: windows2022 - displayName: Windows 2022 - pool: - vmImage: windows-2022 - steps: - - template: templates/ci-general.yml - -- job: windows2019 - displayName: Windows 2019 - pool: - vmImage: windows-2019 - steps: - - template: templates/ci-general.yml - -- job: macOS12 - displayName: macOS 12 - pool: - vmImage: macOS-12 - steps: - - template: templates/ci-general.yml - -- job: ubuntu2004 - displayName: Ubuntu 20.04 - pool: - vmImage: ubuntu-20.04 - steps: - - template: templates/ci-general.yml diff --git a/.vsts-ci/azure-pipelines-release.yml b/.vsts-ci/azure-pipelines-release.yml deleted file mode 100644 index e5aa01b2a..000000000 --- a/.vsts-ci/azure-pipelines-release.yml +++ /dev/null @@ -1,68 +0,0 @@ -name: Release-$(Build.SourceBranchName)-$(Date:yyyyMMdd)$(Rev:.rr) - -pr: none - -trigger: - branches: - include: - - release - -variables: - # Don't download unneeded packages - - name: DOTNET_NOLOGO - value: 'true' - # Improve performance by not sending telemetry - - name: DOTNET_CLI_TELEMETRY_OPTOUT - value: 'true' - # Improve performance by not generating certificates - - name: DOTNET_GENERATE_ASPNET_CERTIFICATE - value: 'false' - -resources: - repositories: - - repository: ComplianceRepo - type: github - endpoint: GitHub - name: PowerShell/compliance - - repository: vscode-powershell - type: git - name: vscode-powershell - -stages: -- stage: Build - displayName: Build the release - jobs: - - job: Build - pool: - name: 1ES - demands: ImageOverride -equals PSMMS2019-Secure - steps: - - template: templates/ci-general.yml - -- stage: Sign - displayName: Sign the release - jobs: - - job: Sign - pool: - name: 1ES - demands: ImageOverride -equals PSMMS2019-Secure - variables: - - group: ESRP - steps: - - template: templates/release-general.yml - -- stage: Publish - displayName: Publish the draft release - jobs: - - deployment: Publish - environment: PowerShellEditorServices - pool: - name: 1ES - demands: ImageOverride -equals PSMMSUbuntu20.04-Secure - variables: - - group: Publish - strategy: - runOnce: - deploy: - steps: - - template: templates/publish-general.yml diff --git a/.vsts-ci/misc-analysis.yml b/.vsts-ci/misc-analysis.yml deleted file mode 100644 index 4d1229508..000000000 --- a/.vsts-ci/misc-analysis.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Misc-$(Build.SourceBranchName)-$(Date:yyyyMMdd)$(Rev:.rr) - -trigger: - - gh-readonly-queue/main/* - -resources: - repositories: - - repository: ComplianceRepo - type: github - endpoint: GitHub - name: PowerShell/compliance - -jobs: -- job: Compliance - pool: - vmImage: windows-latest - steps: - - checkout: self - - checkout: ComplianceRepo - - template: ci-compliance.yml@ComplianceRepo diff --git a/.vsts-ci/templates/ci-general.yml b/.vsts-ci/templates/ci-general.yml deleted file mode 100644 index f18e26ada..000000000 --- a/.vsts-ci/templates/ci-general.yml +++ /dev/null @@ -1,85 +0,0 @@ -steps: -- task: PowerShell@2 - displayName: PowerShell version - inputs: - targetType: inline - pwsh: true - script: $PSVersionTable - -- task: UseDotNet@2 - displayName: Install .NET 8.x SDK - inputs: - packageType: sdk - version: 8.x - -- task: UseDotNet@2 - displayName: Install .NET 7.x runtime - inputs: - packageType: runtime - version: 7.x - -- task: UseDotNet@2 - displayName: Install .NET 6.x runtime - inputs: - packageType: runtime - version: 6.x - -- task: PowerShell@2 - displayName: Install PSResources - inputs: - pwsh: true - filePath: tools/installPSResources.ps1 - -- task: PowerShell@2 - displayName: Build and test - inputs: - targetType: inline - pwsh: true - script: Invoke-Build TestFull -Configuration Release - -- task: PublishTestResults@2 - displayName: Publish test results - inputs: - testRunner: VSTest - testResultsFiles: '**/*.trx' - condition: succeededOrFailed() - -- task: PowerShell@2 - displayName: Assert PowerShellEditorServices release configuration - inputs: - targetType: inline - pwsh: true - script: | - $assembly = [Reflection.Assembly]::LoadFile("$(Build.SourcesDirectory)/module/PowerShellEditorServices/bin/Core/Microsoft.PowerShell.EditorServices.Hosting.dll") - if ($assembly.GetCustomAttributes([System.Diagnostics.DebuggableAttribute], $true).IsJITOptimizerDisabled) { - Write-Host "##vso[task.LogIssue type=error;] PowerShell Editor Services bits were not built in release configuration!" - exit 1 - } - -# NOTE: We zip the artifacts because they're ~20 MB compressed, but ~300 MB raw, -# and we have limited pipeline artifact storage space. -- task: ArchiveFiles@2 - displayName: Zip build output - inputs: - rootFolderOrFile: module - includeRootFolder: false - archiveType: zip - archiveFile: PowerShellEditorServices-Build.zip - verbose: true - -- publish: PowerShellEditorServices-Build.zip - artifact: PowerShellEditorServices-Build-$(System.JobId) - displayName: Publish build output archive - -- task: ArchiveFiles@2 - displayName: Zip sources with `project.assets.json` - inputs: - rootFolderOrFile: src - includeRootFolder: false - archiveType: zip - archiveFile: PowerShellEditorServices-Sources.zip - verbose: true - -- publish: PowerShellEditorServices-Sources.zip - artifact: PowerShellEditorServices-Sources-$(System.JobId) - displayName: Publish sources archive diff --git a/.vsts-ci/templates/publish-general.yml b/.vsts-ci/templates/publish-general.yml deleted file mode 100644 index cb26033b3..000000000 --- a/.vsts-ci/templates/publish-general.yml +++ /dev/null @@ -1,12 +0,0 @@ -steps: -- checkout: self -- checkout: vscode-powershell - -- download: current - artifact: PowerShellEditorServices - displayName: Download signed pipeline artifacts - -- pwsh: | - $(Build.SourcesDirectory)/vscode-powershell/tools/setupReleaseTools.ps1 -Token $(GitHubToken) - New-DraftRelease -RepositoryName PowerShellEditorServices -Assets $(Pipeline.Workspace)/PowerShellEditorServices/PowerShellEditorServices.zip - displayName: Drafting a GitHub Release diff --git a/.vsts-ci/templates/release-general.yml b/.vsts-ci/templates/release-general.yml deleted file mode 100644 index bc4abdfa5..000000000 --- a/.vsts-ci/templates/release-general.yml +++ /dev/null @@ -1,96 +0,0 @@ -steps: -- download: current - displayName: Download unsigned pipeline artifacts - -- task: ExtractFiles@1 - displayName: Extract unsigned artifacts - inputs: - archiveFilePatterns: $(Pipeline.Workspace)/PowerShellEditorServices-Build-*/PowerShellEditorServices-Build.zip - destinationFolder: $(Pipeline.Workspace)/Unsigned - cleanDestinationFolder: true - -- checkout: ComplianceRepo - -# NOTE: The signing templates explicitly copy everything along as they run, so -# the last output path has every signed (and intentionally unsigned) file. -- template: EsrpSign.yml@ComplianceRepo - parameters: - buildOutputPath: $(Pipeline.Workspace)/Unsigned - signOutputPath: $(Pipeline.Workspace)/FirstPartySigned - alwaysCopy: true - certificateId: CP-230012 # Authenticode certificate - shouldSign: true # We always want to sign - useMinimatch: true # This enables the use of globbing - pattern: | - # PowerShellEditorServices Script - PowerShellEditorServices/*.{ps1,psd1,psm1,ps1xml} - PowerShellEditorServices/Commands/**/*.{ps1,psd1,psm1,ps1xml} - # PowerShellEditorServices Binaries - PowerShellEditorServices/**/Microsoft.PowerShell.EditorServices*.dll - -- template: EsrpSign.yml@ComplianceRepo - parameters: - buildOutputPath: $(Pipeline.Workspace)/FirstPartySigned - signOutputPath: $(Pipeline.Workspace)/ThirdPartySigned - alwaysCopy: true - certificateId: CP-231522 # Third-party certificate - shouldSign: true # We always want to sign - useMinimatch: true # This enables the use of globbing - pattern: | - **/MediatR.dll - **/Nerdbank.Streams.dll - **/Newtonsoft.Json.dll - **/OmniSharp*.dll - **/Serilog*.dll - -# The SBOM generation requires our original sources with the `dotnet restore` -# produced `project.assets.json` files. -- task: ExtractFiles@1 - displayName: Extract source artifacts - inputs: - archiveFilePatterns: $(Pipeline.Workspace)/PowerShellEditorServices-Sources-*/PowerShellEditorServices-Sources.zip - destinationFolder: $(Pipeline.Workspace)/Sources - cleanDestinationFolder: true - -- template: Sbom.yml@ComplianceRepo - parameters: - BuildDropPath: $(Pipeline.Workspace)/ThirdPartySigned - Build_Repository_Uri: https://github.com/PowerShell/PowerShellEditorServices.git - packageName: PowerShellEditorServices - packageVersion: $(System.JobId) - sourceScanPath: $(Pipeline.Workspace)/Sources - -- task: ArchiveFiles@2 - displayName: Zip signed artifacts - inputs: - rootFolderOrFile: $(Pipeline.Workspace)/ThirdPartySigned - includeRootFolder: false - archiveType: zip - archiveFile: PowerShellEditorServices.zip - replaceExistingArchive: true - verbose: true - -- checkout: self - -- template: assembly-module-compliance.yml@ComplianceRepo - parameters: - # binskim - AnalyzeTarget: $(Pipeline.Workspace)/*.dll - AnalyzeSymPath: 'SRV*' - # component-governance: requires the `project.assets.json` files - sourceScanPath: $(Pipeline.Workspace)/Sources - # credscan - suppressionsFile: '' - # TermCheck AKA PoliCheck - targetArgument: $(Build.SourcesDirectory)/PowerShellEditorServices - optionsUEPATH: $(Build.SourcesDirectory)/PowerShellEditorServices/tools/terms/UserExclusions.xml - optionsRulesDBPath: '' - optionsFTPath: $(Build.SourcesDirectory)/PowerShellEditorServices/tools/terms/FileTypeSet.xml - # tsa-upload - codeBaseName: PowerShell_PowerShellEditorServices_20210201 - # We don't use any Windows APIs directly, so we don't need API scan - APIScan: false - -- publish: PowerShellEditorServices.zip - artifact: PowerShellEditorServices - displayName: Publish signed pipeline artifacts diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b2ba1b99..10c90056d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # PowerShell Editor Services Release History +## v3.18.1 +### Tuesday, March 19, 2024 + +Servicing release with updated pipeline! + ## v3.18.0 ### Tuesday, March 5, 2024 diff --git a/NuGet.Config b/NuGet.Config index 16746d63c..f04dcd513 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -1,10 +1,7 @@ -<?xml version="1.0" encoding="UTF-8"?> +<?xml version="1.0" encoding="utf-8"?> <configuration> - <packageSources> - <clear /> - <add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> - </packageSources> - <disabledPackageSources> - <clear /> - </disabledPackageSources> + <packageSources> + <clear /> + <add key="PowerShellCore_PublicPackages" value="https://pkgs.dev.azure.com/mscodehub/PowerShellCore/_packaging/PowerShellCore_PublicPackages/nuget/v3/index.json" /> + </packageSources> </configuration> diff --git a/PowerShellEditorServices.Common.props b/PowerShellEditorServices.Common.props index 6e0a04574..80d45b7ba 100644 --- a/PowerShellEditorServices.Common.props +++ b/PowerShellEditorServices.Common.props @@ -1,6 +1,6 @@ <Project> <PropertyGroup> - <VersionPrefix>3.18.0</VersionPrefix> + <VersionPrefix>3.18.1</VersionPrefix> <VersionSuffix></VersionSuffix> <Company>Microsoft</Company> <Copyright>© Microsoft Corporation.</Copyright> diff --git a/README.md b/README.md index 9c89a6926..bb672b7f9 100644 --- a/README.md +++ b/README.md @@ -159,7 +159,20 @@ Install-Module InvokeBuild -Scope CurrentUser Install-Module platyPS -Scope CurrentUser ``` -Now you're ready to build the code. You can do so in one of two ways: +### 4. Delete `NuGet.Config` + +Our NuGet configuration points to a private feed necessary for secure builds, +and it must be committed to the repo as it is. +The easiest way to build without access to that private feed is to delete the file: + +```powershell +Remove-Item NuGet.Config +``` + +Please be careful not to commit this change in a PR. + +Now you're ready to build the code. +You can do so in one of two ways: ### Building the code from PowerShell diff --git a/module/PowerShellEditorServices/PowerShellEditorServices.psd1 b/module/PowerShellEditorServices/PowerShellEditorServices.psd1 index 39b7bca5c..ebeba42f9 100644 --- a/module/PowerShellEditorServices/PowerShellEditorServices.psd1 +++ b/module/PowerShellEditorServices/PowerShellEditorServices.psd1 @@ -19,7 +19,7 @@ RootModule = if ($PSEdition -eq 'Core') } # Version number of this module. -ModuleVersion = '3.18.0' +ModuleVersion = '3.18.1' # ID used to uniquely identify this module GUID = '9ca15887-53a2-479a-9cda-48d26bcb6c47' diff --git a/tools/terms/FileTypeSet.xml b/tools/terms/FileTypeSet.xml deleted file mode 100644 index 82f9f4d09..000000000 --- a/tools/terms/FileTypeSet.xml +++ /dev/null @@ -1,379 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<xmldata> - <PckFileTypes TotalTypes="35" TotalExts="198" UnsupportedFilesOnly="False"> - <Type ID="0" Check="1"> - <Name>Pure Text Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.txt</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.des</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.pwd</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.asm</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.cmd</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ini</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.poc</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.pwt</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hpj</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.sql</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.inf</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.log</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.def</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.url</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.bat</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.aspx</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.idl</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.sys</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.resources</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.strings</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.md</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.yml</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.yaml</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.spelling</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.gitignore</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.gitattributes</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.gitmodules</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.csv</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.tsv</Ext> - </Extensions> - </Type> - <Type ID="1" Check="1"> - <Name>CodeFiles</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.frm</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.inc</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.cpp</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.cls</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.c</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hpp</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.vbs</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.java</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.cs</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.cxx</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.h</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.jav</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.bas</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxx</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.js</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.pl</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.rc</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.vb</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.json</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.resjson</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.fs</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.fsi</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.fsx</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.m</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.psm1</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.config</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ps1</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.psd1</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.cmake</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.sh</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.cshtml</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.plist</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mof</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mc</Ext> - </Extensions> - </Type> - <Type ID="2" Check="1"> - <Name>XML Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xml</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxa</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxk</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxl</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xsl</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxc</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxt</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxm</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.resx</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxe</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxf</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxv</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.acctb</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.accfl</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xaml</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ttml</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ddue</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.sln</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.props</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ps1xml</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.csproj</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xsd</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.svg</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.clixml</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.nuspec</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.cdxml</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.manifest</Ext> - </Extensions> - </Type> - <Type ID="3" Check="1"> - <Name>Microsoft Word Documents</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.doc</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.dot</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.wiz</Ext> - </Extensions> - </Type> - <Type ID="4" Check="1"> - <Name>Microsoft Access Database Compatible</Name> - <Extensions> - <Ext Check="0" UseCustomParser="0" DllPath="" ClassName="">.mdb</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mda</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mde</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mpd</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mdt</Ext> - </Extensions> - </Type> - <Type ID="5" Check="1"> - <Name>Microsoft PowerPoint Presentation</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ppt</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.pot</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.pps</Ext> - </Extensions> - </Type> - <Type ID="6" Check="1"> - <Name>Microsoft Publisher Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.pub</Ext> - </Extensions> - </Type> - <Type ID="7" Check="1"> - <Name>Microsoft Excel Workbooks</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xls</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xlt</Ext> - </Extensions> - </Type> - <Type ID="8" Check="1"> - <Name>Pure Binary Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.com</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.bin</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.tlb</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.drv</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.fon</Ext> - <Ext Check="0" UseCustomParser="0" DllPath="" ClassName="">.blg</Ext> - <Ext Check="0" UseCustomParser="0" DllPath="" ClassName="">.gif</Ext> - <Ext Check="0" UseCustomParser="0" DllPath="" ClassName="">.png</Ext> - <Ext Check="0" UseCustomParser="0" DllPath="" ClassName="">.icns</Ext> - <Ext Check="0" UseCustomParser="0" DllPath="" ClassName="">.ico</Ext> - <Ext Check="0" UseCustomParser="0" DllPath="" ClassName="">.bmp</Ext> - <Ext Check="0" UseCustomParser="0" DllPath="" ClassName="">.pfx</Ext> - </Extensions> - </Type> - <Type ID="9" Check="1"> - <Name>Localization resource databases</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.edb</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.lcl</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xlf</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xliff</Ext> - </Extensions> - </Type> - <Type ID="10" Check="1"> - <Name>Microsoft Project Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mpp</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mpt</Ext> - </Extensions> - </Type> - <Type ID="11" Check="1"> - <Name>Microsoft Visio Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.vsd</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.vdx</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.vss</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.vst</Ext> - </Extensions> - </Type> - <Type ID="12" Check="1"> - <Name>Windows Installer databases</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.msi</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.msm</Ext> - </Extensions> - </Type> - <Type ID="13" Check="1"> - <Name>Zip Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.zip</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.accdt</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.axtr</Ext> - </Extensions> - </Type> - <Type ID="14" Check="1"> - <Name>Cabinet / MS Compression Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.cab</Ext> - </Extensions> - </Type> - <Type ID="15" Check="1"> - <Name>Table driven IME lexicons</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mb</Ext> - </Extensions> - </Type> - <Type ID="16" Check="1"> - <Name>IME ( IMD ) Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.imd</Ext> - </Extensions> - </Type> - <Type ID="17" Check="1"> - <Name>TrueType Font Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ttf</Ext> - </Extensions> - </Type> - <Type ID="18" Check="1"> - <Name>Microsoft Outlook Mail Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.msg</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.oft</Ext> - </Extensions> - </Type> - <Type ID="19" Check="1"> - <Name>HTML Help 2.0 Files / InfoTech5.x Storage System Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.its</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxh</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxr</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxw</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxi</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxs</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxq</Ext> - </Extensions> - </Type> - <Type ID="20" Check="1"> - <Name>Adobe Acrobat PDF Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.pdf</Ext> - </Extensions> - </Type> - <Type ID="21" Check="1"> - <Name>HTML Files / Web Page</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.htm</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.dtd</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hhk</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.htw</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.asp</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.htc</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.htx</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.html</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hhc</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.css</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.stm</Ext> - </Extensions> - </Type> - <Type ID="22" Check="1"> - <Name>Rich Text Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.rtf</Ext> - </Extensions> - </Type> - <Type ID="23" Check="1"> - <Name>Windows 3.x Write Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.wri</Ext> - </Extensions> - </Type> - <Type ID="24" Check="1"> - <Name>MHTML Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.eml</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.nws</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mht</Ext> - </Extensions> - </Type> - <Type ID="25" Check="1"> - <Name>Word 2007 Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.docx</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.docm</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.dotx</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.dotm</Ext> - </Extensions> - </Type> - <Type ID="26" Check="1"> - <Name>Excel 2007 Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xlsx</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xlsm</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xltx</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xltm</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xlsb</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xlam</Ext> - </Extensions> - </Type> - <Type ID="27" Check="1"> - <Name>Power Point 2007 Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.pptx</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.pptm</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.potx</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.potm</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ppsx</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ppsm</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ppam</Ext> - </Extensions> - </Type> - <Type ID="28" Check="1"> - <Name>Access 2007 Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.accdb</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.accde</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.accdr</Ext> - </Extensions> - </Type> - <Type ID="29" Check="1"> - <Name>Win32/64-based executable (image) Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.exe</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.dll</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ocx</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.scr</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.acm</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.rll</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.cpl</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mui</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ax</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ime</Ext> - </Extensions> - </Type> - <Type ID="30" Check="1"> - <Name>HTML Help 1.0 Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.chm</Ext> - </Extensions> - </Type> - <Type ID="31" Check="1"> - <Name>LocStudio lsg</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.lsg</Ext> - </Extensions> - </Type> - <Type ID="32" Check="1"> - <Name>Microsoft Office OneNote Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.one</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.onepkg</Ext> - </Extensions> - </Type> - <Type ID="33" Check="1"> - <Name>Custom Parsers</Name> - <Extensions> - </Extensions> - </Type> - <Type ID="34" Check="1"> - <Name>Visio 2011 Files</Name> - <Extensions> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.vstx</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.vsdx</Ext> - <Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.vssx</Ext> - </Extensions> - </Type> - - </PckFileTypes> -</xmldata> diff --git a/tools/terms/UserExclusions.xml b/tools/terms/UserExclusions.xml deleted file mode 100644 index f7ff9f7b9..000000000 --- a/tools/terms/UserExclusions.xml +++ /dev/null @@ -1,12 +0,0 @@ -<PoliCheckExclusions> - <!-- All strings must be UPPER CASE --> - <!--Each of these exclusions is a folder name -if \[name]\exists in the file path, it will be skipped --> - <!--<Exclusion Type="FolderPathFull">ABC|XYZ</Exclusion>--> - <Exclusion Type="FolderPathFull">.GIT</Exclusion> - <!--Each of these exclusions is a folder name -if any folder or file starts with "\[name]", it will be skipped --> - <!--<Exclusion Type="FolderPathStart">ABC|XYZ</Exclusion>--> - <!--Each of these file types will be completely skipped for the entire scan --> - <!--<Exclusion Type="FileType">.ABC|.XYZ</Exclusion>--> - <!--The specified file names will be skipped during the scan regardless which folder they are in --> - <!--<Exclusion Type="FileName">ABC.TXT|XYZ.CS</Exclusion>--> -</PoliCheckExclusions> diff --git a/tools/updateVersion.ps1 b/tools/updateVersion.ps1 new file mode 100644 index 000000000..e5b94280c --- /dev/null +++ b/tools/updateVersion.ps1 @@ -0,0 +1,45 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +param( + [Parameter(Mandatory)] + [semver]$Version, + + [Parameter(Mandatory)] + [string]$Changes +) + +git diff --staged --quiet --exit-code +if ($LASTEXITCODE -ne 0) { + throw "There are staged changes in the repository. Please commit or reset them before running this script." +} + +$v = "$($Version.Major).$($Version.Minor).$($Version.Patch)" + +$path = "PowerShellEditorServices.Common.props" +$f = Get-Content -Path $path +$f = $f -replace '^(?<prefix>\s+<VersionPrefix>)(.+)(?<suffix></VersionPrefix>)$', "`${prefix}${v}`${suffix}" +$f = $f -replace '^(?<prefix>\s+<VersionSuffix>)(.*)(?<suffix></VersionSuffix>)$', "`${prefix}$($Version.PreReleaseLabel)`${suffix}" +$f | Set-Content -Path $path +git add $path + +$path = "module/PowerShellEditorServices/PowerShellEditorServices.psd1" +$f = Get-Content -Path $path +$f = $f -replace "^(?<prefix>ModuleVersion = ')(.+)(?<suffix>')`$", "`${prefix}${v}`${suffix}" +$f | Set-Content -Path $path +git add $path + +$path = "CHANGELOG.md" +$Changelog = Get-Content -Path $path +@( + $Changelog[0..1] + "## v$Version" + "### $([datetime]::Now.ToString('dddd, MMMM dd, yyyy'))" + "" + $Changes + "" + $Changelog[2..$Changelog.Length] +) | Set-Content -Encoding utf8NoBOM -Path $path +git add $path + +git commit --edit --message "v$($Version): $Changes"