Skip to content

Commit 60d9194

Browse files
author
Colin Blaise
committed
Merge remote-tracking branch 'origin/main' into immybot-latest
2 parents 6597555 + 754c6b8 commit 60d9194

File tree

78 files changed

+857
-2987
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+857
-2987
lines changed

.config/tsaoptions.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"instanceUrl": "https://msazure.visualstudio.com",
3+
"projectName": "One",
4+
"areaPath": "One\\MGMT\\Compute\\Powershell\\Powershell",
5+
"notificationAliases": [ "[email protected]", "[email protected]" ],
6+
"codebaseName": "PowerShell_PowerShellEditorServices_20240313",
7+
"tools": [ "CredScan", "PoliCheck", "BinSkim" ]
8+
}

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ dotnet_diagnostic.CA1805.severity = error
7070
# CA1820: Test for empty strings using string length
7171
dotnet_diagnostic.CA1820.severity = error
7272
# CA1822: Mark members as static
73-
dotnet_diagnostic.CA1822.severity = error
73+
dotnet_diagnostic.CA1822.severity = suggestion
7474
# CA1823: Avoid unused private fields
7575
dotnet_diagnostic.CA1823.severity = error
7676
# CA2007: Do not directly await a Task

.github/release.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- Ignore
5+
authors:
6+
- dependabot[bot]
7+
categories:
8+
- title: Enhancements & Features ✨
9+
labels:
10+
- Issue-Enhancement
11+
- title: Squashed Bugs 🐛
12+
labels:
13+
- Issue-Bug
14+
- title: Other Changes 🙏
15+
labels:
16+
- "*"

.github/workflows/ci-test.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ jobs:
3737
6.0.x
3838
7.0.x
3939
8.0.x
40+
source-url: https://pkgs.dev.azure.com/mscodehub/PowerShellCore/_packaging/PowerShellCore_PublicPackages/nuget/v3/index.json
41+
env:
42+
NUGET_AUTH_TOKEN: ${{ secrets.AZURE_NUGET_TOKEN }}
4043

4144
- name: Install PSResources
4245
shell: pwsh
@@ -52,12 +55,12 @@ jobs:
5255

5356
- name: Build and test
5457
shell: pwsh
55-
run: Invoke-Build ${{ github.event_name == 'merge_group' && 'TestFull' || 'Test' }}
58+
run: Invoke-Build -Configuration Release ${{ github.event_name == 'merge_group' && 'TestFull' || 'Test' }}
5659

5760
- name: Test with daily
5861
if: ${{ github.event_name == 'schedule' }}
5962
shell: pwsh
60-
run: ./pwsh/tools/install-powershell.ps1 -Daily && Invoke-Build TestE2EDaily
63+
run: ./pwsh/tools/install-powershell.ps1 -Daily && Invoke-Build -Configuration Release TestE2EDaily
6164

6265
- name: Upload build artifacts
6366
if: always()

.github/workflows/codeql-analysis.yml

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ jobs:
3333
with:
3434
cache: true
3535
cache-dependency-path: '**/packages.lock.json'
36+
source-url: https://pkgs.dev.azure.com/mscodehub/PowerShellCore/_packaging/PowerShellCore_PublicPackages/nuget/v3/index.json
37+
env:
38+
NUGET_AUTH_TOKEN: ${{ secrets.AZURE_NUGET_TOKEN }}
3639

3740
- name: Initialize CodeQL
3841
uses: github/codeql-action/init@v3

.github/workflows/emacs-test.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jobs:
2727
with:
2828
cache: true
2929
cache-dependency-path: '**/packages.lock.json'
30+
source-url: https://pkgs.dev.azure.com/mscodehub/PowerShellCore/_packaging/PowerShellCore_PublicPackages/nuget/v3/index.json
31+
env:
32+
NUGET_AUTH_TOKEN: ${{ secrets.AZURE_NUGET_TOKEN }}
3033

3134
- name: Install PSResources
3235
shell: pwsh
@@ -41,7 +44,12 @@ jobs:
4144
with:
4245
version: '28.2'
4346

44-
- name: Run ERT
47+
- name: Run ERT with full CLI
4548
run: |
4649
emacs -Q --batch -f package-refresh-contents --eval "(package-install 'eglot)"
4750
emacs -Q --batch -l test/emacs-test.el -f ert-run-tests-batch-and-exit
51+
52+
- name: Run ERT with simple CLI
53+
run: |
54+
emacs -Q --batch -f package-refresh-contents --eval "(package-install 'eglot)"
55+
emacs -Q --batch -l test/emacs-simple-test.el -f ert-run-tests-batch-and-exit

.github/workflows/vim-test.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jobs:
2727
with:
2828
cache: true
2929
cache-dependency-path: '**/packages.lock.json'
30+
source-url: https://pkgs.dev.azure.com/mscodehub/PowerShellCore/_packaging/PowerShellCore_PublicPackages/nuget/v3/index.json
31+
env:
32+
NUGET_AUTH_TOKEN: ${{ secrets.AZURE_NUGET_TOKEN }}
3033

3134
- name: Install PSResources
3235
shell: pwsh
@@ -61,7 +64,12 @@ jobs:
6164
repository: thinca/vim-themis
6265
path: vim-themis
6366

64-
- name: Run Themis
67+
- name: Run Themis with full CLI
6568
env:
6669
THEMIS_VIM: ${{ steps.vim.outputs.executable }}
6770
run: ./vim-themis/bin/themis ./test/vim-test.vim
71+
72+
- name: Run Themis with simple CLI
73+
env:
74+
THEMIS_VIM: ${{ steps.vim.outputs.executable }}
75+
run: ./vim-themis/bin/themis ./test/vim-simple-test.vim

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ PowerShellEditorServices.sln.ide/storage.ide
6868

6969
# Don't include PlatyPS generated MAML
7070
module/PowerShellEditorServices/Commands/en-US/*-help.xml
71-
module/PowerShellEditorServices.VSCode/en-US/*-help.xml
7271

7372
# Don't include Third Party Notices in module folder
7473
module/PowerShellEditorServices/Third\ Party\ Notices.txt
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
#################################################################################
2+
# OneBranch Pipelines #
3+
# This pipeline was created by EasyStart from a sample located at: #
4+
# https://aka.ms/obpipelines/easystart/samples #
5+
# Documentation: https://aka.ms/obpipelines #
6+
# Yaml Schema: https://aka.ms/obpipelines/yaml/schema #
7+
# Retail Tasks: https://aka.ms/obpipelines/tasks #
8+
# Support: https://aka.ms/onebranchsup #
9+
#################################################################################
10+
11+
trigger: none
12+
13+
parameters:
14+
- name: debug
15+
displayName: Enable debug output
16+
type: boolean
17+
default: false
18+
19+
variables:
20+
system.debug: ${{ parameters.debug }}
21+
BuildConfiguration: Release
22+
WindowsContainerImage: onebranch.azurecr.io/windows/ltsc2019/vse2022:latest
23+
DOTNET_NOLOGO: true
24+
DOTNET_CLI_TELEMETRY_OPTOUT: true
25+
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
26+
27+
resources:
28+
repositories:
29+
- repository: templates
30+
type: git
31+
name: OneBranch.Pipelines/GovernedTemplates
32+
ref: refs/heads/main
33+
34+
extends:
35+
# https://aka.ms/obpipelines/templates
36+
template: v2/OneBranch.Official.CrossPlat.yml@templates
37+
parameters:
38+
globalSdl: # https://aka.ms/obpipelines/sdl
39+
asyncSdl:
40+
enabled: true
41+
forStages: [build]
42+
stages:
43+
- stage: build
44+
jobs:
45+
- job: main
46+
displayName: Build package
47+
pool:
48+
type: windows
49+
variables:
50+
ob_outputDirectory: $(Build.SourcesDirectory)/module
51+
steps:
52+
- pwsh: |
53+
[xml]$xml = Get-Content PowerShellEditorServices.Common.props
54+
$version = $xml.Project.PropertyGroup.VersionPrefix
55+
Write-Output "##vso[task.setvariable variable=version;isOutput=true]$version"
56+
name: package
57+
displayName: Get version from project properties
58+
- task: onebranch.pipeline.version@1
59+
displayName: Set OneBranch version
60+
inputs:
61+
system: Custom
62+
customVersion: $(package.version)
63+
- task: UseDotNet@2
64+
displayName: Install .NET 8.x SDK
65+
inputs:
66+
packageType: sdk
67+
version: 8.x
68+
- task: UseDotNet@2
69+
displayName: Install .NET 7.x runtime
70+
inputs:
71+
packageType: runtime
72+
version: 7.x
73+
- task: UseDotNet@2
74+
displayName: Install .NET 6.x runtime
75+
inputs:
76+
packageType: runtime
77+
version: 6.x
78+
- task: PowerShell@2
79+
displayName: Install PSResources
80+
inputs:
81+
pwsh: true
82+
filePath: tools/installPSResources.ps1
83+
- task: PowerShell@2
84+
displayName: Build and test
85+
inputs:
86+
targetType: inline
87+
pwsh: true
88+
script: Invoke-Build TestFull -Configuration $(BuildConfiguration)
89+
- task: PublishTestResults@2
90+
displayName: Publish test results
91+
inputs:
92+
testRunner: VSTest
93+
testResultsFiles: '**/*.trx'
94+
failTaskOnFailedTests: true
95+
- task: PowerShell@2
96+
displayName: Assert release configuration
97+
inputs:
98+
targetType: inline
99+
pwsh: true
100+
script: |
101+
$assembly = [Reflection.Assembly]::LoadFile("$(Build.SourcesDirectory)/module/PowerShellEditorServices/bin/Core/Microsoft.PowerShell.EditorServices.Hosting.dll")
102+
if ($assembly.GetCustomAttributes([System.Diagnostics.DebuggableAttribute], $true).IsJITOptimizerDisabled) {
103+
Write-Host "##vso[task.LogIssue type=error;]Was not built in release configuration!"
104+
exit 1
105+
}
106+
- task: onebranch.pipeline.signing@1
107+
displayName: Sign 1st-party files
108+
inputs:
109+
command: sign
110+
signing_environment: external_distribution
111+
search_root: $(Build.SourcesDirectory)/module
112+
files_to_sign: |
113+
**/*.ps1;
114+
**/*.psd1;
115+
**/*.psm1;
116+
**/*.ps1xml;
117+
**/Microsoft.PowerShell.EditorServices*.dll;
118+
!Plaster/*;
119+
- task: onebranch.pipeline.signing@1
120+
displayName: Sign 3rd-party files
121+
inputs:
122+
command: sign
123+
signing_environment: 135020002
124+
search_root: $(Build.SourcesDirectory)/module
125+
files_to_sign: |
126+
**/MediatR.dll;
127+
**/Nerdbank.Streams.dll;
128+
**/Newtonsoft.Json.dll;
129+
**/OmniSharp.Extensions*.dll;
130+
**/Serilog*.dll;
131+
**/System.Reactive.dll;
132+
Plaster/**/*.ps1;
133+
Plaster/**/*.psd1;
134+
Plaster/**/*.psm1;
135+
- stage: release
136+
dependsOn: build
137+
variables:
138+
version: $[ stageDependencies.build.main.outputs['package.version'] ]
139+
drop: $(Pipeline.Workspace)/drop_build_main
140+
jobs:
141+
- job: validation
142+
displayName: Manual validation
143+
pool:
144+
type: agentless
145+
timeoutInMinutes: 1440
146+
steps:
147+
- task: ManualValidation@0
148+
displayName: Wait 24 hours for validation
149+
inputs:
150+
notifyUsers: $(Build.RequestedForEmail)
151+
instructions: Please validate the release
152+
timeoutInMinutes: 1440
153+
- job: github
154+
dependsOn: validation
155+
displayName: Publish draft to GitHub
156+
pool:
157+
type: windows
158+
variables:
159+
ob_outputDirectory: $(Build.SourcesDirectory)/out
160+
steps:
161+
- download: current
162+
displayName: Download artifacts
163+
- task: ArchiveFiles@2
164+
displayName: Zip signed artifacts
165+
inputs:
166+
rootFolderOrFile: $(drop)
167+
includeRootFolder: false
168+
archiveType: zip
169+
archiveFile: out/PowerShellEditorServices.zip
170+
- task: GitHubRelease@1
171+
displayName: Create GitHub release
172+
inputs:
173+
gitHubConnection: GitHub
174+
repositoryName: PowerShell/PowerShellEditorServices
175+
assets: out/PowerShellEditorServices.zip
176+
tagSource: userSpecifiedTag
177+
tag: v$(version)
178+
isDraft: true
179+
addChangeLog: false
180+
releaseNotesSource: inline
181+
releaseNotesInline: |
182+
# TODO: Generate release notes on GitHub!

.vsts-ci/azure-pipelines-ci.yml

-48
This file was deleted.

0 commit comments

Comments
 (0)