initial
Some checks are pending
CI Tests / dotnet (push) Waiting to run
CI Tests / dotnet-1 (push) Waiting to run
CI Tests / dotnet-2 (push) Waiting to run
Emacs End-to-End Tests / ert (push) Waiting to run
Vim End-to-End Tests / themis (push) Waiting to run

This commit is contained in:
fwastring 2026-02-17 13:06:31 +01:00
commit baa0056244
352 changed files with 47928 additions and 0 deletions

View file

@ -0,0 +1,24 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
param(
[ValidateSet("PSGallery", "CFS")]
[string]$PSRepository = "PSGallery"
)
if ($PSRepository -eq "CFS" -and -not (Get-PSResourceRepository -Name CFS -ErrorAction SilentlyContinue)) {
Register-PSResourceRepository -Name CFS -Uri "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/PowerShellGalleryMirror/nuget/v3/index.json"
}
# NOTE: Due to a bug in Install-PSResource with upstream feeds, we have to
# request an exact version. Otherwise, if a newer version is available in the
# upstream feed, it will fail to install any version at all.
Install-PSResource -Verbose -TrustRepository -RequiredResource @{
InvokeBuild = @{
version = "5.14.18"
repository = $PSRepository
}
platyPS = @{
version = "0.14.2"
repository = $PSRepository
}
}

47
tools/updateVersion.ps1 Normal file
View file

@ -0,0 +1,47 @@
# 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'))"
""
"See more details at the GitHub Release for [v$Version](https://github.com/PowerShell/PowerShellEditorServices/releases/tag/v$Version)."
""
$Changes
""
$Changelog[2..$Changelog.Length]
) | Set-Content -Encoding utf8NoBOM -Path $Path
git add $Path
git commit --edit --message "v$($Version): $Changes"