* Bump System.Management.Automation from 7.3.7 to 7.4.0

Bumps [System.Management.Automation](https://github.com/PowerShell/PowerShell) from 7.3.7 to 7.4.0.
- [Release notes](https://github.com/PowerShell/PowerShell/releases)
- [Commits](https://github.com/PowerShell/PowerShell/compare/v7.3.7...v7.4.0)

---
updated-dependencies:
- dependency-name: System.Management.Automation
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Updates to container

* Fixes

* Fixes

* Fixes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bernie White <bewhite@microsoft.com>
This commit is contained in:
dependabot[bot] 2024-02-04 00:32:46 +10:00 коммит произвёл GitHub
Родитель ca1ef711f2
Коммит 7172600397
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
20 изменённых файлов: 738 добавлений и 733 удалений

Просмотреть файл

@ -1,12 +0,0 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# Visual Studio Code image with .NET
# NOTE:
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/dotnet/.devcontainer/base.Dockerfile
ARG VARIANT="6.0-bullseye-slim"
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT}
RUN sudo apt-get update && sudo apt-get install python3-pip -y

Просмотреть файл

@ -10,6 +10,12 @@ sudo apt install python3-pip -y
sudo python3 -m pip install --upgrade pip
sudo python3 -m pip install wheel
# Install Python packages
pip install -r requirements-docs.txt
# Restore .NET packages
dotnet restore
# Install PowerShell dependencies
$ProgressPreference = [System.Management.Automation.ActionPreference]::SilentlyContinue;
if ($Null -eq (Get-PackageProvider -Name NuGet -ErrorAction Ignore)) {

Просмотреть файл

@ -1,6 +1,9 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
{
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json",
"name": "PSRule dev",
"name": "PSRule development environment",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0-bookworm",
"customizations": {
"vscode": {
"settings": {
@ -23,20 +26,16 @@
}
},
"features": {
"ghcr.io/devcontainers/features/github-cli": {
"ghcr.io/devcontainers/features/github-cli:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/powershell": {
"ghcr.io/devcontainers/features/powershell:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/python:1": {
"version": "latest"
}
},
"onCreateCommand": "/opt/microsoft/powershell/7/pwsh -f .devcontainer/container-build.ps1",
"postStartCommand": "/opt/microsoft/powershell/7/pwsh -f .devcontainer/container-start.ps1",
"build": {
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "6.0-bullseye-slim"
}
},
"remoteUser": "vscode"
"postStartCommand": "/opt/microsoft/powershell/7/pwsh -f .devcontainer/container-start.ps1"
}

42
.github/dependabot.yaml поставляемый
Просмотреть файл

@ -1,42 +0,0 @@
#
# Dependabot configuration
#
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
# Maintain dependencies for NuGet
- package-ecosystem: 'nuget' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: 'daily'
labels:
- 'dependencies'
reviewers:
- 'microsoft/psrule'
ignore:
# Ignore upgrades to PS 7.1 for tool chain components at this time
# Testing against PS 7.1 is already completed
- dependency-name: 'Microsoft.PowerShell.SDK'
# Maintain dependencies for GitHub Actions
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
labels:
- 'ci-quality'
reviewers:
- 'microsoft/psrule'
# Maintain dependencies for Python
- package-ecosystem: 'pip'
directory: '/'
schedule:
interval: 'daily'
labels:
- 'ci-quality'
reviewers:
- 'azure/psrule'

48
.github/dependabot.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,48 @@
#
# Dependabot configuration
#
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
# Maintain dependencies for NuGet
- package-ecosystem: nuget
directory: '/'
schedule:
interval: daily
labels:
- dependencies
reviewers:
- microsoft/psrule
# Maintain dependencies for GitHub Actions
- package-ecosystem: github-actions
directory: '/'
schedule:
interval: daily
labels:
- ci-quality
reviewers:
- microsoft/psrule
# Maintain dependencies for Python
- package-ecosystem: pip
directory: '/'
schedule:
interval: daily
labels:
- ci-quality
reviewers:
- microsoft/psrule
# Maintain dependencies for Dev Containers
- package-ecosystem: devcontainers
directory: '/'
schedule:
interval: weekly
labels:
- ci-quality
reviewers:
- microsoft/psrule

2
.github/workflows/analyze.yaml поставляемый
Просмотреть файл

@ -100,7 +100,7 @@ jobs:
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: 'csharp'
languages: csharp
- name: Autobuild
uses: github/codeql-action/autobuild@v3

4
.github/workflows/build.yaml поставляемый
Просмотреть файл

@ -33,7 +33,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.x
dotnet-version: 8.x
- name: Install dependencies
shell: pwsh
@ -110,7 +110,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.x
dotnet-version: 8.x
- if: ${{ matrix.shell == 'pwsh' }}
name: Install dependencies (PowerShell)

Просмотреть файл

@ -29,6 +29,11 @@ See [upgrade notes][1] for helpful information when upgrading from previous vers
What's changed since pre-release v3.0.0-B0141:
- Engineering:
- **Breaking change:** Bump development tools to .NET 8.0 SDK by @BernieWhite.
[#1673](https://github.com/microsoft/PSRule/pull/1673)
- Running PSRule from PowerShell 7.x is supported on 7.4 and above.
- Running PSRule from Windows PowerShell 5.1 is still supported but deprecated and will be removed in PSRule v4.
- Bug fixes:
- Fixed CLI null reference when include module is undefined by @BernieWhite.
[#1746](https://github.com/microsoft/PSRule/issues/1746)

Просмотреть файл

@ -56,10 +56,10 @@ version: 2
updates:
# Maintain GitHub Actions
- package-ecosystem: "github-actions"
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: "daily"
interval: daily
```
[7]: https://docs.github.com/code-security/dependabot/working-with-dependabot
@ -90,12 +90,12 @@ You can also use this option to install on CI workers that are not natively supp
The following platforms are supported:
- Windows PowerShell 5.1 with .NET Framework 4.7.2 or greater.
- PowerShell 7.3 or greater on MacOS, Linux, and Windows.
- PowerShell 7.4 or greater on MacOS, Linux, and Windows.
### Installing PowerShell
PowerShell 7.x can be installed on MacOS, Linux, and Windows but is not installed by default.
For a list of platforms that PowerShell 7.3 is supported on and install instructions see [Get PowerShell][3].
For a list of platforms that PowerShell 7.4 is supported on and install instructions see [Get PowerShell][3].
!!! Note
If you are using Windows PowerShell you may need to bootstrap NuGet before you can install modules.
@ -198,9 +198,9 @@ The following PowerShell modules will be automatically install if the required v
These additional modules are only required for building PSRule.
Additionally .NET SDK v7 is required.
Additionally .NET SDK v8 is required.
.NET will not be automatically downloaded and installed.
To download and install the latest SDK see [Download .NET 7.0][dotnet].
To download and install the latest SDK see [Download .NET 8.0][dotnet].
### Limited access networks
@ -242,4 +242,4 @@ After downloading the modules, copy the module directories to devices with restr
*[CI]: continuous integration
[module]: https://www.powershellgallery.com/packages/PSRule
[dotnet]: https://dotnet.microsoft.com/download/dotnet/7.0
[dotnet]: https://dotnet.microsoft.com/download/dotnet/8.0

Просмотреть файл

@ -104,7 +104,7 @@ task BuildDotNet {
}
exec {
# Build library
dotnet build src/PSRule.Tool -c $Configuration -f net7.0 -p:version=$Build
dotnet build src/PSRule.Tool -c $Configuration -f net8.0 -p:version=$Build
dotnet build src/PSRule.SDK -c $Configuration -f netstandard2.0 -p:version=$Build
dotnet publish src/PSRule -c $Configuration -f netstandard2.0 -o $(Join-Path -Path $PWD -ChildPath out/modules/PSRule) -p:version=$Build
}
@ -327,7 +327,7 @@ task Rules {
task Benchmark {
if ($Benchmark -or $BuildTask -eq 'Benchmark') {
dotnet run --project src/PSRule.Benchmark -f net7.0 -c Release -- benchmark --output $PWD;
dotnet run --project src/PSRule.Benchmark -f net8.0 -c Release -- benchmark --output $PWD;
}
}

Просмотреть файл

@ -2,7 +2,7 @@
<Import Project="..\PSRule.Common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<PlatformTarget>AnyCPU</PlatformTarget>
<ProjectGuid>{3ec0912f-bfc7-4b53-a1a1-0ba993c6282e}</ProjectGuid>
<EnableNuget>false</EnableNuget>
@ -23,8 +23,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.3.7" />
<PackageReference Include="System.Management.Automation" Version="7.3.7" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.4.1" />
<PackageReference Include="System.Management.Automation" Version="7.4.1" />
<PackageReference Include="Microsoft.Extensions.CommandLineUtils" Version="1.1.1" />
</ItemGroup>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -2,7 +2,7 @@
<Import Project="..\PSRule.Common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyTitle>PSRule.BuildTool</AssemblyTitle>
<EnableNuget>false</EnableNuget>
<IsPackable>false</IsPackable>

Просмотреть файл

@ -1,7 +1,7 @@
{
"version": 1,
"dependencies": {
"net6.0": {
"net8.0": {
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
"requested": "[8.0.0, )",

Просмотреть файл

@ -3,7 +3,7 @@
<!-- Project defaults -->
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>11.0</LangVersion>
<LangVersion>12.0</LangVersion>
<!-- <Nullable>enable</Nullable> -->
<ImplicitUsings>enable</ImplicitUsings>
<NeutralLanguage>en-US</NeutralLanguage>

Просмотреть файл

@ -8,7 +8,7 @@
<ProjectGuid>{bddbfdb8-614f-4b8a-930c-dcb60144598c}</ProjectGuid>
<LangVersion>12.0</LangVersion>
<Nullable>enable</Nullable>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<StartupObject>PSRule.Tool.Program</StartupObject>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
@ -19,8 +19,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.3.7" />
<PackageReference Include="System.Management.Automation" Version="7.3.7" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.4.1" />
<PackageReference Include="System.Management.Automation" Version="7.4.1" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -34,13 +34,13 @@ public sealed class InputPathBuilderTests
actual = builder.Build();
Assert.True(actual.Length > 100);
builder.Add("./.github/*.yaml");
builder.Add("./.github/*.yml");
actual = builder.Build();
Assert.Single(actual);
builder.Add("./.github/**/*.yaml");
actual = builder.Build();
Assert.Equal(7, actual.Length);
Assert.Equal(6, actual.Length);
builder.Add("./.github/");
actual = builder.Build();

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ProjectGuid>{d3488ce2-779f-4474-b38a-f894a4b689f7}</ProjectGuid>
<IsTestProject>true</IsTestProject>
<IsPackable>false</IsPackable>
@ -11,8 +11,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.3.7" />
<PackageReference Include="System.Management.Automation" Version="7.3.7" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.4.1" />
<PackageReference Include="System.Management.Automation" Version="7.4.1" />
<PackageReference Include="xunit" Version="2.6.6" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<PrivateAssets>all</PrivateAssets>

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ProjectGuid>{DA46C891-08F1-4D01-9F98-1F8BB10CAFEC}</ProjectGuid>
<IsTestProject>true</IsTestProject>
<IsPackable>false</IsPackable>