Compare commits
1 commit
master
...
dotnet_upd
Author | SHA1 | Date | |
---|---|---|---|
6b0bf39ce7 |
11
.github/prquantifier.yaml
vendored
11
.github/prquantifier.yaml
vendored
|
@ -1,11 +0,0 @@
|
|||
# https://github.com/microsoft/PullRequestQuantifier/blob/main/docs/prquantifier-yaml.md
|
||||
Excluded:
|
||||
# defaults
|
||||
- '*.csproj'
|
||||
- prquantifier.yaml
|
||||
- package-lock.json
|
||||
- '*.md'
|
||||
- '*.sln'
|
||||
# autogenerated files
|
||||
- cgmanifest.json
|
||||
- assets/wix/files.wxs
|
|
@ -1,27 +0,0 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
function Set-GWVariable {
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$Name,
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$Value
|
||||
)
|
||||
|
||||
Write-Verbose "Setting CI variable $Name to $Value" -Verbose
|
||||
|
||||
if ($env:GITHUB_ENV) {
|
||||
"$Name=$Value" | Out-File $env:GITHUB_ENV -Append
|
||||
}
|
||||
}
|
||||
|
||||
function Get-GWTempPath {
|
||||
$temp = [System.IO.Path]::GetTempPath()
|
||||
if ($env:RUNNER_TEMP) {
|
||||
$temp = $env:RUNNER_TEMP
|
||||
}
|
||||
|
||||
Write-Verbose "Get CI Temp path: $temp" -Verbose
|
||||
return $temp
|
||||
}
|
52
.github/workflows/daily.yml
vendored
52
.github/workflows/daily.yml
vendored
|
@ -30,16 +30,18 @@ jobs:
|
|||
git fetch --prune --unshallow --tags
|
||||
- name: Execute Update .NET script
|
||||
run: |
|
||||
Import-Module ./.github/workflows/GHWorkflowHelper
|
||||
$currentVersion = (Get-Content .\global.json | ConvertFrom-Json).sdk.version
|
||||
Set-GWVariable -Name OLD_VERSION -Value $currentVersion
|
||||
Write-Verbose "OLD_VERSION=$currentVersion" -Verbose
|
||||
"OLD_VERSION=$currentVersion" | Out-File $env:GITHUB_ENV -Append
|
||||
|
||||
./tools/UpdateDotnetRuntime.ps1 -UpdateMSIPackaging -UseInternalFeed
|
||||
$newVersion = (Get-Content .\global.json | ConvertFrom-Json).sdk.version
|
||||
Set-GWVariable -Name NEW_VERSION -Value $newVersion
|
||||
Write-Verbose "NEW_VERSION=$newVersion" -Verbose
|
||||
"NEW_VERSION=$newVersion" | Out-File $env:GITHUB_ENV -Append
|
||||
|
||||
if ($currentVersion -ne $newVersion) {
|
||||
Set-GWVariable -Name CREATE_PR -Value 'true'
|
||||
Write-Verbose "CREATE_PR=true" -Verbose
|
||||
"CREATE_PR=true" | Out-File $env:GITHUB_ENV -Append
|
||||
}
|
||||
- name: Microsoft Teams Notifier
|
||||
uses: skitionek/notify-microsoft-teams@master
|
||||
|
@ -56,43 +58,5 @@ jobs:
|
|||
title: "Update .NET SDK version from `${{ env.OLD_VERSION }}` to `${{ env.NEW_VERSION }}`"
|
||||
base: master
|
||||
branch: dotnet_update
|
||||
update-tpn:
|
||||
name: Update Notices File
|
||||
timeout-minutes: 15
|
||||
runs-on: windows-latest
|
||||
if: github.repository == 'PowerShell/PowerShell'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Update Notices file
|
||||
run: |
|
||||
Invoke-WebRequest -Uri https://aka.ms/pwsh-daily-tpn -OutFile ./ThirdPartyNotices.txt
|
||||
- name: Capture Git Status
|
||||
run: |
|
||||
git status --short
|
||||
- name: Check if we need to create a PR
|
||||
run: |
|
||||
$ErrorActionPreference = 'continue'
|
||||
git diff --quiet ThirdPartyNotices.txt
|
||||
$exitCode = $LASTEXITCODE
|
||||
Write-Verbose -Message "Exit code: $exitCode" -Verbose
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Import-Module ./.github/workflows/GHWorkflowHelper
|
||||
Set-GWVariable -Name CREATE_PR -Value 'true'
|
||||
} else {
|
||||
Write-Verbose "No difference found. Not creating a PR." -Verbose
|
||||
}
|
||||
exit 0
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
id: cprtpn
|
||||
if: env.CREATE_PR == 'true'
|
||||
with:
|
||||
commit-message: "Update to the latest notice file"
|
||||
committer: GitHub <noreply@github.com>
|
||||
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
|
||||
title: "Update to the latest notice file"
|
||||
reviewers: travisez13
|
||||
base: master
|
||||
draft: false
|
||||
branch: update-cgmanifest
|
||||
|
||||
|
||||
|
|
57
.github/workflows/update-cgmanifest.yml
vendored
57
.github/workflows/update-cgmanifest.yml
vendored
|
@ -1,57 +0,0 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT license.
|
||||
|
||||
name: Update cgmanifest
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: pwsh
|
||||
|
||||
env:
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
POWERSHELL_TELEMETRY_OPTOUT: 1
|
||||
CGMANIFEST_PATH: ''
|
||||
NUGET_PACKAGES: ${{ github.workspace }}\.nuget\packages
|
||||
|
||||
jobs:
|
||||
update-cgmanifest:
|
||||
name: Update cgmanifest
|
||||
timeout-minutes: 15
|
||||
runs-on: windows-latest
|
||||
if: github.repository == 'PowerShell/PowerShell'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Cache DotNet
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~\AppData\Local\Microsoft\dotnet
|
||||
${{ github.workspace }}\.nuget\packages
|
||||
key: ${{ runner.os }}-${{ hashFiles('**\DotnetRuntimeMetadata.json') }}-${{ hashFiles('**\nuget.config') }}
|
||||
- name: Sync tags
|
||||
run: |
|
||||
git fetch --prune --unshallow --tags
|
||||
- name: Install Ships provider to deal with project.assets.json
|
||||
run: |
|
||||
Install-Module -Name dotnet.project.assets -force
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
Import-Module ./build.psm1
|
||||
Start-PSBootStrap
|
||||
- name: Verify cgmanifest is up to date
|
||||
run: |
|
||||
Import-Module ./build.psm1
|
||||
Find-Dotnet
|
||||
./tools/findMissingNotices.ps1
|
||||
- name: Upload cgmanifest
|
||||
uses: actions/upload-artifact@v2
|
||||
if: always() && env.CGMANIFEST_PATH != ''
|
||||
with:
|
||||
name: cgmanifest
|
||||
path: ${{ env.CGMANIFEST_PATH }}
|
19
.spelling
19
.spelling
|
@ -15,7 +15,6 @@
|
|||
about_
|
||||
about_debuggers
|
||||
about_jobs
|
||||
about_Telemetry
|
||||
acl
|
||||
adamdriscoll
|
||||
add-localgroupmember
|
||||
|
@ -1270,7 +1269,7 @@ package.json
|
|||
jcotton42
|
||||
RPMs
|
||||
PSDesiredStateConfiguration
|
||||
- CHANGELOG/7.2.md
|
||||
- CHANGELOG/preview.md
|
||||
Gimly
|
||||
jborean93
|
||||
mkswd
|
||||
|
@ -1384,22 +1383,6 @@ lselden
|
|||
SethFalco
|
||||
CodeQL
|
||||
slowy07
|
||||
rc.2.21505.57
|
||||
ThirdPartyNotices.txt
|
||||
cgmanifest.json
|
||||
buildinfo
|
||||
tar.gz
|
||||
psoptions.json
|
||||
manifest.spdx.json
|
||||
vPack
|
||||
kondratyev-nv
|
||||
v7.2.0
|
||||
cgmanifest.json
|
||||
pwsh.exe
|
||||
6.0.100-rtm.21527.11
|
||||
6.0.100-rc.2.21505.57
|
||||
ThirdPartyNotices.txt
|
||||
rtm.21527.11
|
||||
- CHANGELOG/7.0.md
|
||||
codesign
|
||||
release-BuildJson
|
||||
|
|
|
@ -11,9 +11,9 @@ trigger:
|
|||
include:
|
||||
- '*'
|
||||
exclude:
|
||||
- .vsts-ci/misc-analysis.yml
|
||||
- .github/ISSUE_TEMPLATE/*
|
||||
- .dependabot/config.yml
|
||||
- /.vsts-ci/misc-analysis.yml
|
||||
- /.github/ISSUE_TEMPLATE/*
|
||||
- /.dependabot/config.yml
|
||||
- test/perf/*
|
||||
pr:
|
||||
branches:
|
||||
|
@ -30,14 +30,10 @@ pr:
|
|||
- .vsts-ci/misc-analysis.yml
|
||||
- .vsts-ci/windows.yml
|
||||
- .vsts-ci/windows/*
|
||||
- cgmanifest.json
|
||||
- LICENSE.txt
|
||||
- test/common/markdown/*
|
||||
- test/perf/*
|
||||
- tools/releaseBuild/*
|
||||
- tools/releaseBuild/azureDevOps/templates/*
|
||||
- README.md
|
||||
- .spelling
|
||||
|
||||
variables:
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
|
|
|
@ -11,10 +11,10 @@ trigger:
|
|||
include:
|
||||
- '*'
|
||||
exclude:
|
||||
- tools/releaseBuild/**/*
|
||||
- .vsts-ci/misc-analysis.yml
|
||||
- .github/ISSUE_TEMPLATE/*
|
||||
- .dependabot/config.yml
|
||||
- /tools/releaseBuild/**/*
|
||||
- /.vsts-ci/misc-analysis.yml
|
||||
- /.github/ISSUE_TEMPLATE/*
|
||||
- /.dependabot/config.yml
|
||||
- test/perf/*
|
||||
pr:
|
||||
branches:
|
||||
|
@ -29,17 +29,13 @@ pr:
|
|||
- .dependabot/config.yml
|
||||
- .github/ISSUE_TEMPLATE/*
|
||||
- .vsts-ci/misc-analysis.yml
|
||||
- .vsts-ci/windows.yml
|
||||
- .vsts-ci/windows/*
|
||||
- cgmanifest.json
|
||||
- LICENSE.txt
|
||||
- /.vsts-ci/windows.yml
|
||||
- /.vsts-ci/windows/*
|
||||
- test/common/markdown/*
|
||||
- test/perf/*
|
||||
- tools/packaging/*
|
||||
- tools/releaseBuild/*
|
||||
- tools/releaseBuild/azureDevOps/templates/*
|
||||
- README.md
|
||||
- .spelling
|
||||
|
||||
variables:
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
|
@ -101,6 +97,10 @@ stages:
|
|||
vmImage: macOS-latest
|
||||
steps:
|
||||
- pwsh: |
|
||||
# Remove old .NET SDKs
|
||||
if (Test-Path -Path $HOME/.dotnet) {
|
||||
Remove-Item $HOME/.dotnet -Recurse -Force
|
||||
}
|
||||
Import-Module .\tools\ci.psm1
|
||||
New-CodeCoverageAndTestPackage
|
||||
displayName: CodeCoverage and Test Package
|
||||
|
|
|
@ -27,41 +27,83 @@ variables:
|
|||
- name: repoFolder
|
||||
value: PowerShell
|
||||
|
||||
stages:
|
||||
- stage: Compliance
|
||||
jobs:
|
||||
- job: CI_Compliance
|
||||
displayName: CI Compliance
|
||||
jobs:
|
||||
- job: CI_Compliance
|
||||
displayName: CI Compliance
|
||||
|
||||
pool:
|
||||
vmImage: windows-latest
|
||||
pool:
|
||||
vmImage: windows-latest
|
||||
|
||||
variables:
|
||||
- name: repoPath
|
||||
value: $(Agent.BuildDirectory)\$(repoFolder)
|
||||
variables:
|
||||
- name: repoPath
|
||||
value: $(Agent.BuildDirectory)\$(repoFolder)
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
path: $(repoFolder)
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
path: $(repoFolder)
|
||||
|
||||
- checkout: ComplianceRepo
|
||||
- checkout: ComplianceRepo
|
||||
|
||||
- template: ci-compliance.yml@ComplianceRepo
|
||||
- stage: markdown_spelling_lint
|
||||
displayName: Markdown Spelling and Lint
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: ./misc-analysis/mdSpell.yml
|
||||
- stage: markdown_link
|
||||
displayName: Markdown Link
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: ./misc-analysis/generateMarkdownMatrix.yml
|
||||
- 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)'
|
||||
|
||||
- ${{ 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 -OutputFile $path -OutputFormat NUnitXml -PassThru
|
||||
Write-Host "##vso[results.publish type=NUnit;mergeResults=true;runTitle=Common Tests;publishRunAttachments=true;resultFiles=$path;]"
|
||||
if($results.TotalCount -eq 0 -or $results.FailedCount -gt 0)
|
||||
{
|
||||
throw "Markdown tests failed"
|
||||
}
|
||||
displayName: Run Common Tests
|
||||
condition: succeededOrFailed()
|
||||
workingDirectory: '$(repoPath)'
|
||||
|
||||
- template: dailyBuildCompliance.yml@ComplianceRepo
|
||||
parameters:
|
||||
jobName: generateMatrix
|
||||
taskName: matrixTask
|
||||
- template: ./misc-analysis/markdown.yml
|
||||
parameters:
|
||||
matrix: $[ dependencies.generateMatrix.outputs['matrixTask.matrix'] ]
|
||||
dependsOn: generateMatrix
|
||||
sourceScanPath: '$(repoPath)'
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
parameters:
|
||||
- name: jobName
|
||||
- name: taskName
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.jobName }}
|
||||
displayName: Generate Markdown Matrix
|
||||
|
||||
pool:
|
||||
vmImage: ubuntu-20.04
|
||||
|
||||
variables:
|
||||
- name: repoPath
|
||||
value: $(Agent.BuildDirectory)/$(repoFolder)
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
path: $(repoFolder)
|
||||
|
||||
- powershell: |
|
||||
$matrix = @{}
|
||||
$matrix += @{
|
||||
'root' = @{
|
||||
markdown_folder = "$(repoPath)"
|
||||
markdown_recurse = $false
|
||||
}
|
||||
}
|
||||
Get-ChildItem -path '$(repoPath)' -Directory | Foreach-Object {
|
||||
$folder = $_
|
||||
$matrix += @{
|
||||
$_.Name = @{
|
||||
markdown_folder = $_.fullName
|
||||
markdown_recurse = $true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$matrixJson = $matrix | ConvertTo-Json -Compress
|
||||
$variableName = "matrix"
|
||||
$command = "vso[task.setvariable variable=$variableName;isoutput=true]$($matrixJson)"
|
||||
Write-Verbose "sending command: '$command'"
|
||||
Write-Host "##$command"
|
||||
displayName: Create Matrix
|
||||
condition: succeededOrFailed()
|
||||
name: ${{ parameters.taskName }}
|
|
@ -1,63 +0,0 @@
|
|||
parameters:
|
||||
- name: matrix
|
||||
- name: dependsOn
|
||||
|
||||
jobs:
|
||||
- job: markdown
|
||||
strategy:
|
||||
matrix: ${{ parameters.matrix }}
|
||||
maxParallel: 5
|
||||
|
||||
displayName: Markdown Link Verification
|
||||
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
|
||||
pool:
|
||||
vmImage: ubuntu-20.04
|
||||
|
||||
variables:
|
||||
- name: repoPath
|
||||
value: $(Agent.BuildDirectory)/$(repoFolder)
|
||||
- name: YARN_CACHE_FOLDER
|
||||
value: $(Pipeline.Workspace)/.yarn
|
||||
- name: YARN_GLOBAL_CACHE_FOLDER
|
||||
value: $(Pipeline.Workspace)/.yarn-global
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
path: $(repoFolder)
|
||||
|
||||
- checkout: ComplianceRepo
|
||||
|
||||
- task: Cache@2
|
||||
inputs:
|
||||
key: '"markdown-link-check" | "$(Agent.OS)" | $(repoPath)/test/common/markdown-link/markdown-link.tests.ps1'
|
||||
path: $(YARN_GLOBAL_CACHE_FOLDER)
|
||||
displayName: Cache Yarn packages
|
||||
|
||||
- powershell: |
|
||||
Install-module Pester -Scope CurrentUser -Force -MaximumVersion 4.99
|
||||
displayName: Install Pester
|
||||
|
||||
- bash: |
|
||||
curl -o- --progress-bar -L https://yarnpkg.com/install.sh | bash
|
||||
displayName: Bootstrap Yarn
|
||||
|
||||
- bash: |
|
||||
yarn config set global-folder "$(YARN_GLOBAL_CACHE_FOLDER)"
|
||||
displayName: Set Yarn global cache folder
|
||||
|
||||
- ${{ 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-link -OutputFile $path -OutputFormat NUnitXml -PassThru
|
||||
Write-Host "##vso[results.publish type=NUnit;mergeResults=true;runTitle=Markdown Link;publishRunAttachments=true;resultFiles=$path;]"
|
||||
if($results.TotalCount -eq 0 -or $results.FailedCount -gt 0)
|
||||
{
|
||||
throw "Markdown tests failed"
|
||||
}
|
||||
displayName: Run Markdown Link Tests
|
||||
condition: succeededOrFailed()
|
||||
workingDirectory: '$(repoPath)'
|
|
@ -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)'
|
|
@ -11,31 +11,38 @@ jobs:
|
|||
displayName: ${{ parameters.displayName }}
|
||||
|
||||
steps:
|
||||
- pwsh: |
|
||||
- powershell: |
|
||||
Get-ChildItem -Path env:
|
||||
displayName: Capture Environment
|
||||
condition: succeededOrFailed()
|
||||
|
||||
- pwsh: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhmmss"))"
|
||||
- powershell: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhmmss"))"
|
||||
displayName: Set Build Name for Non-PR
|
||||
condition: ne(variables['Build.Reason'], 'PullRequest')
|
||||
|
||||
- ${{ if ne(variables['AzDevOpsFeed'], '') }}:
|
||||
- template: /tools/releaseBuild/azureDevOps/templates/insert-nuget-config-azfeed.yml
|
||||
|
||||
- pwsh: |
|
||||
if (Test-Path -Path $HOME/.dotnet) {
|
||||
Remove-Item $HOME/.dotnet -Recurse -Force
|
||||
}
|
||||
displayName: Remove Old .NET SDKs
|
||||
condition: succeededOrFailed()
|
||||
|
||||
- pwsh: |
|
||||
Import-Module .\tools\ci.psm1
|
||||
Invoke-CIInstall -SkipUser
|
||||
displayName: Bootstrap
|
||||
condition: succeeded()
|
||||
|
||||
- pwsh: |
|
||||
- powershell: |
|
||||
Import-Module .\tools\ci.psm1
|
||||
Invoke-CIBuild
|
||||
displayName: Build
|
||||
condition: succeeded()
|
||||
|
||||
- pwsh: |
|
||||
- powershell: |
|
||||
Import-Module .\tools\ci.psm1
|
||||
Restore-PSOptions
|
||||
Invoke-CIxUnit -SkipFailing
|
||||
|
|
|
@ -33,6 +33,13 @@ jobs:
|
|||
displayName: 'Capture Artifacts Directory'
|
||||
continueOnError: true
|
||||
|
||||
- pwsh: |
|
||||
if (Test-Path -Path $HOME/.dotnet) {
|
||||
Remove-Item $HOME/.dotnet -Recurse -Force
|
||||
}
|
||||
displayName: Remove Old .NET SDKs
|
||||
condition: succeededOrFailed()
|
||||
|
||||
- pwsh: |
|
||||
Import-Module .\tools\ci.psm1
|
||||
Invoke-CIInstall -SkipUser
|
||||
|
|
|
@ -11,9 +11,9 @@ trigger:
|
|||
include:
|
||||
- '*'
|
||||
exclude:
|
||||
- .vsts-ci/misc-analysis.yml
|
||||
- .github/ISSUE_TEMPLATE/*
|
||||
- .dependabot/config.yml
|
||||
- /.vsts-ci/misc-analysis.yml
|
||||
- /.github/ISSUE_TEMPLATE/*
|
||||
- /.dependabot/config.yml
|
||||
- test/perf/*
|
||||
pr:
|
||||
branches:
|
||||
|
@ -28,15 +28,11 @@ pr:
|
|||
- .dependabot/config.yml
|
||||
- .github/ISSUE_TEMPLATE/*
|
||||
- .vsts-ci/misc-analysis.yml
|
||||
- cgmanifest.json
|
||||
- LICENSE.txt
|
||||
- test/common/markdown/*
|
||||
- test/perf/*
|
||||
- tools/packaging/*
|
||||
- tools/releaseBuild/*
|
||||
- tools/releaseBuild/azureDevOps/templates/*
|
||||
- README.md
|
||||
- .spelling
|
||||
|
||||
variables:
|
||||
GIT_CONFIG_PARAMETERS: "'core.autocrlf=false'"
|
||||
|
|
|
@ -3,8 +3,6 @@ parameters:
|
|||
default: 'Hosted VS2017'
|
||||
- name: jobName
|
||||
default: 'win_packaging'
|
||||
- name: runtimePrefix
|
||||
default: 'win7'
|
||||
- name: architecture
|
||||
default: 'x64'
|
||||
- name: channel
|
||||
|
@ -42,12 +40,6 @@ jobs:
|
|||
displayName: Capture environment
|
||||
condition: succeededOrFailed()
|
||||
|
||||
- pwsh: |
|
||||
$PSVersionTable
|
||||
displayName: Capture PowerShell Version Table
|
||||
condition: succeededOrFailed()
|
||||
|
||||
|
||||
- template: /tools/releaseBuild/azureDevOps/templates/insert-nuget-config-azfeed.yml
|
||||
|
||||
- pwsh: |
|
||||
|
@ -60,7 +52,7 @@ jobs:
|
|||
- pwsh: |
|
||||
Import-Module .\tools\ci.psm1
|
||||
New-CodeCoverageAndTestPackage
|
||||
Invoke-CIFinish -Runtime ${{ parameters.runtimePrefix }}-${{ parameters.architecture }} -channel ${{ parameters.channel }} -Stage Build
|
||||
Invoke-CIFinish -Runtime win7-${{ parameters.architecture }} -channel ${{ parameters.channel }} -Stage Build
|
||||
displayName: Build
|
||||
workingDirectory: $(repoPath)
|
||||
|
||||
|
@ -73,6 +65,6 @@ jobs:
|
|||
- pwsh: |
|
||||
Import-Module .\tools\ci.psm1
|
||||
New-CodeCoverageAndTestPackage
|
||||
Invoke-CIFinish -Runtime ${{ parameters.runtimePrefix }}-${{ parameters.architecture }} -channel ${{ parameters.channel }} -Stage Package
|
||||
Invoke-CIFinish -Runtime win7-${{ parameters.architecture }} -channel ${{ parameters.channel }} -Stage Package
|
||||
displayName: Package and Test
|
||||
workingDirectory: $(repoPath)
|
||||
|
|
|
@ -93,13 +93,3 @@ stages:
|
|||
parameters:
|
||||
channel: preview
|
||||
architecture: x86
|
||||
- template: templates/windows-packaging.yml
|
||||
parameters:
|
||||
channel: preview
|
||||
architecture: arm
|
||||
runtimePrefix: win
|
||||
- template: templates/windows-packaging.yml
|
||||
parameters:
|
||||
channel: preview
|
||||
architecture: arm64
|
||||
runtimePrefix: win
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0-rtm.21504.2" PrivateAssets="all" />
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.354" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
1122
CHANGELOG/7.2.md
1122
CHANGELOG/7.2.md
File diff suppressed because it is too large
Load diff
1033
CHANGELOG/preview.md
1033
CHANGELOG/preview.md
File diff suppressed because it is too large
Load diff
|
@ -1,15 +1,13 @@
|
|||
{
|
||||
"sdk": {
|
||||
"channel": "6.0.1xx",
|
||||
"channel": "6.0.1xx-rc1",
|
||||
"quality": "signed",
|
||||
"qualityFallback": "daily",
|
||||
"packageVersionPattern": "6.0.0",
|
||||
"packageVersionPattern": "6.0.0-rc.1",
|
||||
"sdkImageVersion": "6.0.100",
|
||||
"nextChannel": "6.0.1xx",
|
||||
"azureFeed": "",
|
||||
"sdkImageOverride": ""
|
||||
"nextChannel": "6.0.1xx-rc1"
|
||||
},
|
||||
"internalfeed" : {
|
||||
"url": ""
|
||||
"url": "https://pkgs.dev.azure.com/dnceng/public/_packaging/6.0.100-rc.1.21458.32-shipping/nuget/v2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -138,7 +138,6 @@
|
|||
<TargetFramework>net6.0</TargetFramework>
|
||||
<LangVersion>10.0</LangVersion>
|
||||
<PublishReadyToRun Condition=" '$(Configuration)' != 'Debug' ">true</PublishReadyToRun>
|
||||
<PublishReadyToRunEmitSymbols>true</PublishReadyToRunEmitSymbols>
|
||||
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
|
|
112
README.md
112
README.md
|
@ -30,19 +30,19 @@ You can download and install a PowerShell package for any of the following platf
|
|||
| -------------------------------------------| ------------------------| ------------------------| ----------------------| ------------------------------|
|
||||
| [Windows (x64)][corefx-win] | [.msi][lts-windows-64] | [.msi][rl-windows-64] | [.msi][pv-windows-64] | [Instructions][in-windows] |
|
||||
| [Windows (x86)][corefx-win] | [.msi][lts-windows-86] | [.msi][rl-windows-86] | [.msi][pv-windows-86] | [Instructions][in-windows] |
|
||||
| [Ubuntu 20.04][corefx-linux] | [.deb][lts-deb] | [.deb][rl-ubuntu20] | [.deb][pv-deb] | [Instructions][in-ubuntu20] |
|
||||
| [Ubuntu 18.04][corefx-linux] | [.deb][lts-deb] | [.deb][rl-ubuntu18] | [.deb][pv-deb] | [Instructions][in-ubuntu18] |
|
||||
| [Ubuntu 16.04][corefx-linux] | [.deb][lts-deb] | [.deb][rl-ubuntu16] | [.deb][pv-deb] | [Instructions][in-ubuntu16] |
|
||||
| [Debian 9][corefx-linux] | [.deb][lts-deb] | [.deb][rl-debian9] | [.deb][pv-deb] | [Instructions][in-deb9] |
|
||||
| [Debian 10][corefx-linux] | [.deb][lts-deb] | [.deb][rl-debian10] | [.deb][pv-deb] | [Instructions][in-deb9] |
|
||||
| [Debian 11][corefx-linux] | [.deb][lts-deb] | [.deb][rl-debian11] | [.deb][pv-deb] | |
|
||||
| [CentOS 7][corefx-linux] | [.rpm][lts-rh] | [.rpm][rl-centos] | [.rpm][pv-rpm] | [Instructions][in-centos] |
|
||||
| [CentOS 8][corefx-linux] | [.rpm][lts-rh] | [.rpm][rl-centos8] | [.rpm][pv-rpm] | |
|
||||
| [Red Hat Enterprise Linux 7][corefx-linux] | [.rpm][lts-rh] | [.rpm][rl-centos] | [.rpm][pv-rpm] | [Instructions][in-rhel7] |
|
||||
| [openSUSE 42.3][corefx-linux] | [.rpm][lts-rh] | [.rpm][rl-centos] | [.rpm][pv-rpm] | [Instructions][in-opensuse] |
|
||||
| [Fedora 30][corefx-linux] | [.rpm][lts-rh] | [.rpm][rl-centos] | [.rpm][pv-rpm] | [Instructions][in-fedora] |
|
||||
| [Ubuntu 20.04][corefx-linux] | | [.deb][rl-ubuntu20] | [.deb][pv-deb] | [Instructions][in-ubuntu20] |
|
||||
| [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 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] | |
|
||||
| [Red Hat Enterprise Linux 7][corefx-linux] | [.rpm][lts-centos] | [.rpm][rl-centos] | [.rpm][pv-rpm] | [Instructions][in-rhel7] |
|
||||
| [openSUSE 42.3][corefx-linux] | [.rpm][lts-centos] | [.rpm][rl-centos] | [.rpm][pv-rpm] | [Instructions][in-opensuse] |
|
||||
| [Fedora 30][corefx-linux] | [.rpm][lts-centos] | [.rpm][rl-centos] | [.rpm][pv-rpm] | [Instructions][in-fedora] |
|
||||
| [macOS 10.13+ (x64)][corefx-macos] | [.pkg][lts-macos] | [.pkg][rl-macos] | [.pkg][pv-macos] | [Instructions][in-macos] |
|
||||
| [macOS 10.13+ (arm64)][corefx-macos] | [.pkg][lts-macos-arm64] | [.pkg][rl-macos-arm64] | [.pkg][pv-macos-arm64]| [Instructions][in-macos] |
|
||||
| [macOS 10.13+ (arm64)][corefx-macos] | | | [.pkg][pv-macos-arm64]| [Instructions][in-macos] |
|
||||
| Docker | | | | [Instructions][in-docker] |
|
||||
|
||||
You can download and install a PowerShell package for any of the following platforms, **which are supported by the community.**
|
||||
|
@ -59,54 +59,55 @@ You can also download the PowerShell binary archives for Windows, macOS and Linu
|
|||
| ---------------| --------------------------------------------------- | ------------------------------------------------| -----------------------------------------------|
|
||||
| Windows | [32-bit][rl-winx86-zip]/[64-bit][rl-winx64-zip] | [32-bit][pv-winx86-zip]/[64-bit][pv-winx64-zip] | [Instructions][in-windows-zip] |
|
||||
| macOS (x64) | [64-bit][rl-macos-tar] | [64-bit][pv-macos-tar] | [Instructions][in-tar-macos] |
|
||||
| macOS (arm64) | [64-bit][rl-macos-tar-arm64] | [64-bit][pv-macos-tar-arm64] | [Instructions][in-tar-macos] |
|
||||
| macOS (arm64) | | [64-bit][pv-macos-tar-arm64] | [Instructions][in-tar-macos] |
|
||||
| Linux | [64-bit][rl-linux-tar] | [64-bit][pv-linux-tar] | [Instructions][in-tar-linux] |
|
||||
| Windows (Arm) | [64-bit][rl-winarm64] (preview) | [64-bit][pv-winarm64] | [Instructions][in-arm] |
|
||||
| Raspbian (Arm) | [32-bit][rl-arm32]/[64-bit][rl-arm64] | [32-bit][pv-arm32]/[64-bit][pv-arm64] | [Instructions][in-raspbian] |
|
||||
|
||||
[lts-windows-86]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/PowerShell-7.2.0-win-x86.msi
|
||||
[lts-windows-64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/PowerShell-7.2.0-win-x64.msi
|
||||
[lts-deb]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/powershell-lts_7.2.0-1.deb_amd64.deb
|
||||
[lts-rh]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/powershell-lts-7.2.0-1.rh.x86_64.rpm
|
||||
[lts-macos]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/powershell-lts-7.2.0-osx-x64.pkg
|
||||
[lts-macos-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/powershell-lts-7.2.0-osx-arm64.pkg
|
||||
[lts-windows-86]: https://github.com/PowerShell/PowerShell/releases/download/v7.0.8/PowerShell-7.0.8-win-x86.msi
|
||||
[lts-windows-64]: https://github.com/PowerShell/PowerShell/releases/download/v7.0.8/PowerShell-7.0.8-win-x64.msi
|
||||
[lts-ubuntu18]: https://github.com/PowerShell/PowerShell/releases/download/v7.0.8/powershell-lts_7.0.8-1.ubuntu.18.04_amd64.deb
|
||||
[lts-ubuntu16]: https://github.com/PowerShell/PowerShell/releases/download/v7.0.8/powershell-lts_7.0.8-1.ubuntu.16.04_amd64.deb
|
||||
[lts-debian9]: https://github.com/PowerShell/PowerShell/releases/download/v7.0.8/powershell-lts_7.0.8-1.debian.9_amd64.deb
|
||||
[lts-debian10]: https://github.com/PowerShell/PowerShell/releases/download/v7.0.8/powershell-lts_7.0.8-1.debian.10_amd64.deb
|
||||
[lts-centos]: https://github.com/PowerShell/PowerShell/releases/download/v7.0.8/powershell-lts-7.0.8-1.rhel.7.x86_64.rpm
|
||||
[lts-centos8]: https://github.com/PowerShell/PowerShell/releases/download/v7.0.8/powershell-lts-7.0.8-1.centos.8.x86_64.rpm
|
||||
[lts-macos]: https://github.com/PowerShell/PowerShell/releases/download/v7.0.8/powershell-lts-7.0.8-osx-x64.pkg
|
||||
|
||||
[rl-windows-64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/PowerShell-7.2.0-win-x64.msi
|
||||
[rl-windows-86]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/PowerShell-7.2.0-win-x86.msi
|
||||
[rl-ubuntu20]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/powershell_7.2.0-1.deb_amd64.deb
|
||||
[rl-ubuntu18]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/powershell_7.2.0-1.deb_amd64.deb
|
||||
[rl-ubuntu16]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/powershell_7.2.0-1.deb_amd64.deb
|
||||
[rl-debian9]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/powershell_7.2.0-1.deb_amd64.deb
|
||||
[rl-debian10]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/powershell_7.2.0-1.deb_amd64.deb
|
||||
[rl-debian11]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/powershell_7.2.0-1.deb_amd64.deb
|
||||
[rl-centos]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/powershell-7.2.0-1.rh.x86_64.rpm
|
||||
[rl-centos8]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/powershell-7.2.0-1.rh.x86_64.rpm
|
||||
[rl-macos]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/powershell-7.2.0-osx-x64.pkg
|
||||
[rl-macos-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/powershell-7.2.0-osx-arm64.pkg
|
||||
[rl-winarm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/PowerShell-7.2.0-win-arm64.zip
|
||||
[rl-winx86-zip]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/PowerShell-7.2.0-win-x86.zip
|
||||
[rl-winx64-zip]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/PowerShell-7.2.0-win-x64.zip
|
||||
[rl-macos-tar]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/powershell-7.2.0-osx-x64.tar.gz
|
||||
[rl-macos-tar-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/powershell-7.2.0-osx-arm64.tar.gz
|
||||
[rl-linux-tar]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/powershell-7.2.0-linux-x64.tar.gz
|
||||
[rl-arm32]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/powershell-7.2.0-linux-arm32.tar.gz
|
||||
[rl-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/powershell-7.2.0-linux-arm64.tar.gz
|
||||
[rl-windows-64]: https://github.com/PowerShell/PowerShell/releases/download/v7.1.5/PowerShell-7.1.5-win-x64.msi
|
||||
[rl-windows-86]: https://github.com/PowerShell/PowerShell/releases/download/v7.1.5/PowerShell-7.1.5-win-x86.msi
|
||||
[rl-ubuntu20]: https://github.com/PowerShell/PowerShell/releases/download/v7.1.5/powershell_7.1.5-1.ubuntu.20.04_amd64.deb
|
||||
[rl-ubuntu18]: https://github.com/PowerShell/PowerShell/releases/download/v7.1.5/powershell_7.1.5-1.ubuntu.18.04_amd64.deb
|
||||
[rl-ubuntu16]: https://github.com/PowerShell/PowerShell/releases/download/v7.1.5/powershell_7.1.5-1.ubuntu.16.04_amd64.deb
|
||||
[rl-debian9]: https://github.com/PowerShell/PowerShell/releases/download/v7.1.5/powershell_7.1.5-1.debian.9_amd64.deb
|
||||
[rl-debian10]: https://github.com/PowerShell/PowerShell/releases/download/v7.1.5/powershell_7.1.5-1.debian.10_amd64.deb
|
||||
[rl-debian11]: https://github.com/PowerShell/PowerShell/releases/download/v7.1.5/powershell_7.1.5-1.debian.11_amd64.deb
|
||||
[rl-centos]: https://github.com/PowerShell/PowerShell/releases/download/v7.1.5/powershell-7.1.5-1.rhel.7.x86_64.rpm
|
||||
[rl-centos8]: https://github.com/PowerShell/PowerShell/releases/download/v7.1.5/powershell-7.1.5-1.centos.8.x86_64.rpm
|
||||
[rl-macos]: https://github.com/PowerShell/PowerShell/releases/download/v7.1.5/powershell-7.1.5-osx-x64.pkg
|
||||
[rl-winarm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.1.5/PowerShell-7.1.5-win-arm64.zip
|
||||
[rl-winx86-zip]: https://github.com/PowerShell/PowerShell/releases/download/v7.1.5/PowerShell-7.1.5-win-x86.zip
|
||||
[rl-winx64-zip]: https://github.com/PowerShell/PowerShell/releases/download/v7.1.5/PowerShell-7.1.5-win-x64.zip
|
||||
[rl-macos-tar]: https://github.com/PowerShell/PowerShell/releases/download/v7.1.5/powershell-7.1.5-osx-x64.tar.gz
|
||||
[rl-linux-tar]: https://github.com/PowerShell/PowerShell/releases/download/v7.1.5/powershell-7.1.5-linux-x64.tar.gz
|
||||
[rl-arm32]: https://github.com/PowerShell/PowerShell/releases/download/v7.1.5/powershell-7.1.5-linux-arm32.tar.gz
|
||||
[rl-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.1.5/powershell-7.1.5-linux-arm64.tar.gz
|
||||
[rl-snap]: https://snapcraft.io/powershell
|
||||
|
||||
[pv-windows-64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-rc.1/PowerShell-7.2.0-rc.1-win-x64.msi
|
||||
[pv-windows-86]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-rc.1/PowerShell-7.2.0-rc.1-win-x86.msi
|
||||
[pv-deb]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-rc.1/powershell-preview_7.2.0-rc.1-1.deb_amd64.deb
|
||||
[pv-rpm]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-rc.1/powershell-preview-7.2.0_rc.1-1.rh.x86_64.rpm
|
||||
[pv-macos]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-rc.1/powershell-7.2.0-rc.1-osx-x64.pkg
|
||||
[pv-macos-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-rc.1/powershell-7.2.0-rc.1-osx-arm64.pkg
|
||||
[pv-winarm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-rc.1/PowerShell-7.2.0-rc.1-win-arm64.zip
|
||||
[pv-winx86-zip]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-rc.1/PowerShell-7.2.0-rc.1-win-x86.zip
|
||||
[pv-winx64-zip]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-rc.1/PowerShell-7.2.0-rc.1-win-x64.zip
|
||||
[pv-macos-tar]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-rc.1/powershell-7.2.0-rc.1-osx-x64.tar.gz
|
||||
[pv-macos-tar-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-rc.1/powershell-7.2.0-rc.1-osx-arm64.tar.gz
|
||||
[pv-linux-tar]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-rc.1/powershell-7.2.0-rc.1-linux-x64.tar.gz
|
||||
[pv-arm32]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-rc.1/powershell-7.2.0-rc.1-linux-arm32.tar.gz
|
||||
[pv-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-rc.1/powershell-7.2.0-rc.1-linux-arm64.tar.gz
|
||||
[pv-windows-64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-preview.10/PowerShell-7.2.0-preview.10-win-x64.msi
|
||||
[pv-windows-86]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-preview.10/PowerShell-7.2.0-preview.10-win-x86.msi
|
||||
[pv-deb]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-preview.10/powershell-preview_7.2.0-preview.10-1.deb_amd64.deb
|
||||
[pv-rpm]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-preview.10/powershell-preview-7.2.0_preview.10-1.rh.x86_64.rpm
|
||||
[pv-macos]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-preview.10/powershell-7.2.0-preview.10-osx-x64.pkg
|
||||
[pv-macos-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-preview.10/powershell-7.2.0-preview.10-osx-arm64.pkg
|
||||
[pv-winarm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-preview.10/PowerShell-7.2.0-preview.10-win-arm64.zip
|
||||
[pv-winx86-zip]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-preview.10/PowerShell-7.2.0-preview.10-win-x86.zip
|
||||
[pv-winx64-zip]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-preview.10/PowerShell-7.2.0-preview.10-win-x64.zip
|
||||
[pv-macos-tar]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-preview.10/powershell-7.2.0-preview.10-osx-x64.tar.gz
|
||||
[pv-macos-tar-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-preview.10/powershell-7.2.0-preview.10-osx-arm64.tar.gz
|
||||
[pv-linux-tar]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-preview.10/powershell-7.2.0-preview.10-linux-x64.tar.gz
|
||||
[pv-arm32]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-preview.10/powershell-7.2.0-preview.10-linux-arm32.tar.gz
|
||||
[pv-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-preview.10/powershell-7.2.0-preview.10-linux-arm64.tar.gz
|
||||
[pv-snap]: https://snapcraft.io/powershell-preview
|
||||
|
||||
[in-windows]: https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-windows
|
||||
|
@ -239,8 +240,9 @@ License: By requesting and using the Container OS Image for Windows containers,
|
|||
|
||||
### Telemetry
|
||||
|
||||
Please visit our [about_Telemetry](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_telemetry)
|
||||
topic to read details about telemetry gathered by PowerShell.
|
||||
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/).
|
||||
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/).
|
||||
|
||||
## Governance
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,42 +1,46 @@
|
|||
## Used to generate a new TPN
|
||||
## Copy this into the additional attributions fields
|
||||
## Copy everything below here, but do not include this line
|
||||
|
||||
-------------------------------------------------------------------
|
||||
---------------------------------------------
|
||||
File: PSReadLine
|
||||
---------------------------------------------
|
||||
|
||||
-------------------------------------------------------------------
|
||||
https://github.com/lzybkr/PSReadLine
|
||||
|
||||
Additional -
|
||||
Copyright (c) 2013, Jason Shirk
|
||||
|
||||
-------------------------------------------------
|
||||
Microsoft.PowerShell.Archive
|
||||
-------------------------------------------------
|
||||
All rights reserved.
|
||||
|
||||
Copyright (c) 2016 Microsoft Corporation.
|
||||
BSD License
|
||||
|
||||
The MIT License (MIT)
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
----------------------------------------------
|
||||
File: Hashtables from ConvertFrom-json
|
||||
----------------------------------------------
|
||||
|
||||
-------------------------------------------------
|
||||
Microsoft.Management.Infrastructure.Runtime.Unix
|
||||
Microsoft.Management.Infrastructure
|
||||
-------------------------------------------------
|
||||
https://stackoverflow.com/questions/22002748/hashtables-from-convertfrom-json-have-different-type-from-powershells-built-in-h
|
||||
|
||||
Copyright (c) Microsoft Corporation
|
||||
Copyright (c) 2015 Dave Wyatt. All rights reserved.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -48,6 +52,33 @@ The above copyright notice and this permission notice shall be included in all c
|
|||
|
||||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
-------------------------------------------------
|
||||
PackageManagement
|
||||
-------------------------------------------------
|
||||
|
||||
Copyright (c) Microsoft Corporation
|
||||
All rights reserved.
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the Software), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
--------------------------------------------------------
|
||||
• NuGet.Common
|
||||
• NuGet.Configuration
|
||||
|
@ -77,116 +108,3 @@ Unless required by applicable law or agreed to in writing, software distributed
|
|||
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations under the License.
|
||||
|
||||
-------------------------------------------------
|
||||
PackageManagement
|
||||
-------------------------------------------------
|
||||
|
||||
Copyright (c) Microsoft Corporation
|
||||
All rights reserved.
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the Software), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
-------------------------------------------------
|
||||
PowerShellGet
|
||||
-------------------------------------------------
|
||||
|
||||
Copyright (c) Microsoft Corporation
|
||||
|
||||
All rights reserved.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
---------------------------------------------
|
||||
File: PSReadLine
|
||||
---------------------------------------------
|
||||
|
||||
https://github.com/PowerShell/PSReadLine
|
||||
|
||||
Copyright (c) 2013, Jason Shirk
|
||||
|
||||
All rights reserved.
|
||||
|
||||
BSD License
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
-------------------------------------------------
|
||||
ThreadJob
|
||||
-------------------------------------------------
|
||||
|
||||
Copyright (c) 2018 Paul Higinbotham
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
|
|
@ -361,7 +361,7 @@
|
|||
<Text><![CDATA[<a href="https://aka.ms/PowerShell-Microsoft-Update-FAQ">See the Microsoft Update FAQ</a>]]></Text>
|
||||
</Control>
|
||||
<Control Id="PrivacyLink" Type="Hyperlink" X="20" Y="210" Width="290" Height="17">
|
||||
<Text><![CDATA[<a href="https://aka.ms/PowerShell-Microsoft-Update-Privacy-Statement">Read the Microsoft Update Privacy Statement</a>]]></Text>
|
||||
<Text><![CDATA[<a href="https://aka.ms/PowerShell-Microsoft-Update-Privacy-Statement">Read the Microsoft Update Priacy Statement</a>]]></Text>
|
||||
</Control>
|
||||
<!-- divider and bottom buttons -->
|
||||
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" TabSkip="yes"/>
|
||||
|
|
|
@ -1605,24 +1605,9 @@
|
|||
<Component Id="cmp19ADFEFDD03047828CF493B5B5CE7B6E">
|
||||
<File Id="filCE65C019A32144BB9E9CCA3D5E634E32" KeyPath="yes" Source="$(var.ProductSourcePath)\ref\System.Net.Http.Json.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp72C41225E0B4457C8CB5F4C5FE6E3187" Guid="{ee32f38f-14ee-4a85-914f-d02522cc3635}">
|
||||
<File Id="fil04B0F83A7AED430A86A7E6E3E99AB45D" KeyPath="yes" Source="$(var.ProductSourcePath)\ref\System.Formats.Asn1.dll" />
|
||||
</Component>
|
||||
<Component Id="cmpEE26930D65E346FDAE1B3E07F5DBEF77">
|
||||
<File Id="filBC93A3F22F78439F8D4173E4C64ACFDC" KeyPath="yes" Source="$(var.ProductSourcePath)\ref\System.Text.Encodings.Web.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp834F3E0C83664E92B0D115A39A8FAACB">
|
||||
<File Id="fil6A09131961874B31AC3EBEC863CC12C4" KeyPath="yes" Source="$(var.ProductSourcePath)\ref\System.Runtime.CompilerServices.Unsafe.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp68158D010ECB439582D041355BFACCBB">
|
||||
<File Id="filB8694A0190CA422E9462870B514B813C" KeyPath="yes" Source="$(var.ProductSourcePath)\ref\System.Text.Encoding.CodePages.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp690F24F04C044127A61754363A4D63E3">
|
||||
<File Id="fil5BF6895A87684AC088DAB3759AA465BA" KeyPath="yes" Source="$(var.ProductSourcePath)\ref\Microsoft.Win32.Registry.dll" />
|
||||
</Component>
|
||||
<Component Id="cmpFAD6557C4AEC48B89DDC4E6485C020C4">
|
||||
<File Id="fil47E7A45E0FDB48248C3741FCD3DA2368" KeyPath="yes" Source="$(var.ProductSourcePath)\ref\System.Security.AccessControl.dll" />
|
||||
</Component>
|
||||
<Component Id="cmpB5458B36303A472B80582AF1C2E7FB94">
|
||||
<File Id="fil676439EF2BA242189585EA6953BF5A8C" KeyPath="yes" Source="$(var.ProductSourcePath)\ref\System.IO.FileSystem.AccessControl.dll" />
|
||||
</Component>
|
||||
|
@ -1987,11 +1972,8 @@
|
|||
<Component Id="cmp57D197B18F1F4A6AAB704B28CF61B535">
|
||||
<File Id="fil71B3802CB88348AC888B9902212CADA2" KeyPath="yes" Source="$(var.ProductSourcePath)\cs\Microsoft.VisualBasic.Forms.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp690BAC3241424F59B5D30DE0E846D03E">
|
||||
<File Id="filDBDCB9BFFF9F425B8CF7F7A5F05D42B1" KeyPath="yes" Source="$(var.ProductSourcePath)\cs\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp5B67AE2852E04C26970FD2016CA76E07">
|
||||
<File Id="fil42D10EBCB41B426BAFBF26BB053A9E84" KeyPath="yes" Source="$(var.ProductSourcePath)\cs\System.Web.Services.Description.resources.dll" />
|
||||
<Component Id="cmp0646771B60E943FAB07C93E038178F70">
|
||||
<File Id="fil533342B266C3425D9215621AB0A79BBB" KeyPath="yes" Source="$(var.ProductSourcePath)\cs\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="dirEA0127D6607E68B508B9DB9CE315A2CE" Name="de">
|
||||
|
@ -2052,11 +2034,8 @@
|
|||
<Component Id="cmpB40EE0CC916B4928987F62F5909AE709">
|
||||
<File Id="filA21E2DDEAEAE4E0D94346C5671D9D29F" KeyPath="yes" Source="$(var.ProductSourcePath)\de\System.Windows.Forms.Primitives.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmpB43ED7BA30C844E2B5C38F7B747EEFDC">
|
||||
<File Id="filE106C77258F047E8A384E1E75B7EF6B8" KeyPath="yes" Source="$(var.ProductSourcePath)\de\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp777DF202EF2542F2ACFCCF0481E8D6EE">
|
||||
<File Id="filFCCE95BFDDD540E1AA243049872EF5D0" KeyPath="yes" Source="$(var.ProductSourcePath)\de\System.Web.Services.Description.resources.dll" />
|
||||
<Component Id="cmp50C7C43130D843E98E33E3A5776E3C73">
|
||||
<File Id="filBAEBD8A638E34B4E8209B39F3448B8C9" KeyPath="yes" Source="$(var.ProductSourcePath)\de\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="dir5B65D7353FBDCD17AB60A674B3FDF93B" Name="es">
|
||||
|
@ -2117,11 +2096,8 @@
|
|||
<Component Id="cmpB944176DE7924A268269903DC0B5D510">
|
||||
<File Id="filBA47C41DFB3849228624C99949FB61FC" KeyPath="yes" Source="$(var.ProductSourcePath)\es\System.Windows.Forms.Primitives.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmpCC4A42AA70EE4418926986F5A4B8D3FA">
|
||||
<File Id="fil186134FCB6984F1484A8308DF4F2B917" KeyPath="yes" Source="$(var.ProductSourcePath)\es\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmpF96C036EAE3B436DB096888697193FAF">
|
||||
<File Id="fil761ECB84FAFA4674AB5712669532C569" KeyPath="yes" Source="$(var.ProductSourcePath)\es\System.Web.Services.Description.resources.dll" />
|
||||
<Component Id="cmp0AD152BE1EE94B3799D1DC33132BDAC9">
|
||||
<File Id="fil97C4735890394FA3A2E46425AE2C15B9" KeyPath="yes" Source="$(var.ProductSourcePath)\es\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="dir23063512FA8C884E1B4F08FDF0A44516" Name="fr">
|
||||
|
@ -2182,11 +2158,8 @@
|
|||
<Component Id="cmp7B5948A1A366409F99B871F0E772B945">
|
||||
<File Id="filCCA6A5EE7ED9459C93A8C05B0A93880F" KeyPath="yes" Source="$(var.ProductSourcePath)\fr\System.Windows.Forms.Primitives.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmpE7BE9D8F63E04798870E57BA1EABB9A5">
|
||||
<File Id="fil93C038D9EED945F5A984CF3C98EDB72B" KeyPath="yes" Source="$(var.ProductSourcePath)\fr\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp789F545EA2CB4AC5A2688CF730A5F6B4">
|
||||
<File Id="fil70A83BE26FCF4905B220521A6B75198D" KeyPath="yes" Source="$(var.ProductSourcePath)\fr\System.Web.Services.Description.resources.dll" />
|
||||
<Component Id="cmpBF98B0006F8542FF978542764EB56D52">
|
||||
<File Id="filE56ADB8B38BE4CB6AC198B3DCEDFCAE5" KeyPath="yes" Source="$(var.ProductSourcePath)\fr\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="dir42B03840AE19D1498CC524F2B6C0389D" Name="it">
|
||||
|
@ -2247,11 +2220,8 @@
|
|||
<Component Id="cmp28349C4ACD6D42D3967853E0A1D7DC4E">
|
||||
<File Id="filDF0828378FCA4CAC8F7DA90DC4F802CC" KeyPath="yes" Source="$(var.ProductSourcePath)\it\Microsoft.VisualBasic.Forms.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp166B17F72C954B0087DF991E560B399A">
|
||||
<File Id="fil528F0FBF10C246568FCE1F5B10E541D1" KeyPath="yes" Source="$(var.ProductSourcePath)\it\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp0173AE0CBFA44C269D93361F6C98F99B">
|
||||
<File Id="fil3767F5D3C1264EC596A9F335355521C6" KeyPath="yes" Source="$(var.ProductSourcePath)\it\System.Web.Services.Description.resources.dll" />
|
||||
<Component Id="cmpA489A6DFC6E9415E8FBFCE6C661ACCB4">
|
||||
<File Id="fil01BA56FCEE78496D88CA957D058899E5" KeyPath="yes" Source="$(var.ProductSourcePath)\it\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="dir086D21BE309BE4C7081FC60E3524890F" Name="ja">
|
||||
|
@ -2312,11 +2282,8 @@
|
|||
<Component Id="cmp26335B5D1FE94E87A6B6EBD56A22C2B9">
|
||||
<File Id="filD585A7E89ACF4E4CB9DB8EAD4ACB7092" KeyPath="yes" Source="$(var.ProductSourcePath)\ja\System.Windows.Forms.Primitives.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp529A2B5343FD466884FAF627E37C648D">
|
||||
<File Id="fil265B2A6A67EF4C6E8C17BDC3AAD8F729" KeyPath="yes" Source="$(var.ProductSourcePath)\ja\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp5492F78ACB1A4391BBED371FDFC06B9E">
|
||||
<File Id="fil54F7909E28E54B0687222DFD1D95009D" KeyPath="yes" Source="$(var.ProductSourcePath)\ja\System.Web.Services.Description.resources.dll" />
|
||||
<Component Id="cmp474CC87075C94683829B02B2DE9D69C2">
|
||||
<File Id="fil412E3B067B4C49CA856371EF091BA824" KeyPath="yes" Source="$(var.ProductSourcePath)\ja\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="dir43D6CAD5F3ED1060009918D06D84FB18" Name="ko">
|
||||
|
@ -2377,11 +2344,8 @@
|
|||
<Component Id="cmpF4093A1E8AB94B43AB0F852EB647CE7F">
|
||||
<File Id="filCE28F42A54C24F5DA508904E60E23BBD" KeyPath="yes" Source="$(var.ProductSourcePath)\ko\System.Windows.Forms.Primitives.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp4EE1633EE4864CE5B9015BF76BD31D14">
|
||||
<File Id="fil688FE14A80204086A48DE1BDC6591EB0" KeyPath="yes" Source="$(var.ProductSourcePath)\ko\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp3B07F4E4B6034F3284288C18F4638CA7">
|
||||
<File Id="filA52AFEA335CA41D98DB28358CE344EB5" KeyPath="yes" Source="$(var.ProductSourcePath)\ko\System.Web.Services.Description.resources.dll" />
|
||||
<Component Id="cmp1940ECC1F3D4430088BEF3D8B88392A0">
|
||||
<File Id="filD0AD8690657446879DB4D6594FF0952E" KeyPath="yes" Source="$(var.ProductSourcePath)\ko\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="dirE8201C74A7184D11233BAD63C6DB37BD" Name="pl">
|
||||
|
@ -2442,11 +2406,8 @@
|
|||
<Component Id="cmp705598FEC8EA43D7A9B239787BA5DB09">
|
||||
<File Id="filD8ECB20D015F4477ABD58505B48D02D1" KeyPath="yes" Source="$(var.ProductSourcePath)\pl\System.Windows.Forms.Primitives.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmpC8C68DB0DEE44CF49D98532D2C26395E">
|
||||
<File Id="fil1959B05E9F214DCFA6670F1892EE2E7D" KeyPath="yes" Source="$(var.ProductSourcePath)\pl\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmpA8A66545C44F428BB552B55EEE353BB0">
|
||||
<File Id="filC0107BEFC31E4F9AB5037537B82D92EF" KeyPath="yes" Source="$(var.ProductSourcePath)\pl\System.Web.Services.Description.resources.dll" />
|
||||
<Component Id="cmp839164626FE5471793C7375623442686">
|
||||
<File Id="filD09556E30A99492AACCE81184C8D76D1" KeyPath="yes" Source="$(var.ProductSourcePath)\pl\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="dir47ED939BFA870848E0764E862CD6B4D7" Name="pt-BR">
|
||||
|
@ -2507,11 +2468,8 @@
|
|||
<Component Id="cmpFAA0CCBA17FE4E8FAE5FE4B5F679DF52">
|
||||
<File Id="fil6A42B845F64A4B2490AFFA079E0FB086" KeyPath="yes" Source="$(var.ProductSourcePath)\pt-BR\System.Windows.Forms.Primitives.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmpF3C18F07C6A148638CBC858EB02E3A6D">
|
||||
<File Id="filE6672552F1EE45D3AC3021E02DB093CB" KeyPath="yes" Source="$(var.ProductSourcePath)\pt-BR\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp0C4751F9D5C14419A45F234152D21DA9">
|
||||
<File Id="filF6E3EF23DEEF4D3BB3CA9C9D084FB607" KeyPath="yes" Source="$(var.ProductSourcePath)\pt-BR\System.Web.Services.Description.resources.dll" />
|
||||
<Component Id="cmp0C47328F9CCE4CC0B89D70C0F43F03E4">
|
||||
<File Id="filE333AC39C05047C2BF8AFA3F52DDA715" KeyPath="yes" Source="$(var.ProductSourcePath)\pt-BR\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="dir37B8DFAE26D5F8E9948851F7D19F9E20" Name="ru">
|
||||
|
@ -2572,11 +2530,8 @@
|
|||
<Component Id="cmpA6FA5B27C61E482D8BBC5F1806D3B223">
|
||||
<File Id="filD4732A3ABFD342B890F75CCB5DE1CAE8" KeyPath="yes" Source="$(var.ProductSourcePath)\ru\System.Windows.Forms.Primitives.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmpBD958F4B8F9146499DE2CA6321C65F96">
|
||||
<File Id="fil6A1EB9311FE546F69F28948794DC43BF" KeyPath="yes" Source="$(var.ProductSourcePath)\ru\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp6ADB50DF9F2D4BCA9E682AA6D1C7C03B">
|
||||
<File Id="fil7FECA5AED84D4C84968358F2C065BBEC" KeyPath="yes" Source="$(var.ProductSourcePath)\ru\System.Web.Services.Description.resources.dll" />
|
||||
<Component Id="cmpAFD9FDD8CE8947B89381E43EC88A75A2">
|
||||
<File Id="filB9326EB2CC6A40EE96741996EB1C5E56" KeyPath="yes" Source="$(var.ProductSourcePath)\ru\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="dirA7E9CC01273A7FED89FC8D3A368E00CC" Name="tr">
|
||||
|
@ -2637,11 +2592,8 @@
|
|||
<Component Id="cmp10773057C33543FA93222022DEC0847D">
|
||||
<File Id="filD2D3E621E5C54C5EBF044078C9073C2B" KeyPath="yes" Source="$(var.ProductSourcePath)\tr\Microsoft.VisualBasic.Forms.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp2B8239B905B146A69CD5D55A353AC131">
|
||||
<File Id="fil618AA430D1794A45A1D2BAA2451BECB2" KeyPath="yes" Source="$(var.ProductSourcePath)\tr\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp9FCFAEB797D9475C873E21B4B5A89E28">
|
||||
<File Id="filC4BDA69F669843EAAD7B6D8714CB1420" KeyPath="yes" Source="$(var.ProductSourcePath)\tr\System.Web.Services.Description.resources.dll" />
|
||||
<Component Id="cmp6C427F4049C14D19A0C37B8A18C109B7">
|
||||
<File Id="fil97E877330AA144528ECBE994B7BAC60F" KeyPath="yes" Source="$(var.ProductSourcePath)\tr\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="dir47E993970F74AA9F393D23500827D12C" Name="zh-Hans">
|
||||
|
@ -2702,11 +2654,8 @@
|
|||
<Component Id="cmp33364765C98D4BE09BD26DC1E6B95B86">
|
||||
<File Id="filB57C4C58936D4A7587CEA358B1AF57C2" KeyPath="yes" Source="$(var.ProductSourcePath)\zh-Hans\Microsoft.VisualBasic.Forms.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp582595AE8291444E837793472E0A259C">
|
||||
<File Id="fil7044506B31FA4130B2E375147032298D" KeyPath="yes" Source="$(var.ProductSourcePath)\zh-Hans\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmpF24D3B9F29F84B4D9C47577B7926FC2E">
|
||||
<File Id="fil0AF0C0F933404EABBC94B10ED8740042" KeyPath="yes" Source="$(var.ProductSourcePath)\zh-Hans\System.Web.Services.Description.resources.dll" />
|
||||
<Component Id="cmp45AF8A57AB984B09B6C0F533CA65A419">
|
||||
<File Id="filBE9A0089F0C740D9927BF54EA2D5C08A" KeyPath="yes" Source="$(var.ProductSourcePath)\zh-Hans\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="dirB1FFB91EED6FD71EA866548CEA3A5298" Name="zh-Hant">
|
||||
|
@ -2767,11 +2716,8 @@
|
|||
<Component Id="cmpB9B22A80E70F414B8778B852E29D6492">
|
||||
<File Id="fil46C0F341CAB64BD390BEA73E1FE0F552" KeyPath="yes" Source="$(var.ProductSourcePath)\zh-Hant\Microsoft.VisualBasic.Forms.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp91C27D1766E84B8BB0F0C70888F03C2E">
|
||||
<File Id="filC888727CE05A4A9FA0DB66EE0F15097C" KeyPath="yes" Source="$(var.ProductSourcePath)\zh-Hant\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
<Component Id="cmpD55F08F6CF51498E9E8551067BA57040">
|
||||
<File Id="fil46C47F01171F45A898A7AD6A14ACE432" KeyPath="yes" Source="$(var.ProductSourcePath)\zh-Hant\System.Web.Services.Description.resources.dll" />
|
||||
<Component Id="cmpC73BF895808E42489E3F3510C62229F6">
|
||||
<File Id="fil34053CE0061844139A8E37671F0193C5" KeyPath="yes" Source="$(var.ProductSourcePath)\zh-Hant\System.Private.ServiceModel.resources.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Name="Schemas" Id="dir1DB5B24CC3494785974A51F28F128069">
|
||||
|
@ -3132,27 +3078,126 @@
|
|||
<Component Id="cmp957498053E01454DA1E21E6D7317DCD6">
|
||||
<File Id="fil2AA6F0D8A51D4BB89F33F2B73AB12391" KeyPath="yes" Source="$(var.ProductSourcePath)\msquic.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp2EB55EB6B44F4CF186F0BAFD6B33BCD6">
|
||||
<File Id="filC629C6EFCF314F9BB78C56E0876C08EB" KeyPath="yes" Source="$(var.ProductSourcePath)\mscordaccore_$(var.FileArchitecture)_$(var.FileArchitecture)_6.0.21.45113.dll" />
|
||||
</Component>
|
||||
<Directory Name="_manifest" Id="dir81094D6B916B4BC8B1BA0E1DADB93A02">
|
||||
<Directory Name="spdx_2.2" Id="dirA36413FB3A534FDF8657D62728080E9F">
|
||||
<Component Id="cmp408A3AF905EB47ADA35FBC5A6B1465A0">
|
||||
<File Id="fil2146848B6ACB45FCA8E9C8FEE3BECDD8" KeyPath="yes" Source="$(var.ProductSourcePath)\_manifest\spdx_2.2\manifest.spdx.json" />
|
||||
</Component>
|
||||
</Directory>
|
||||
</Directory>
|
||||
<Component Id="cmpA6276F9EAB41411AAAEC496E67A3DBAE">
|
||||
<File Id="filC840646CDE814D33B16DA3A5BBDDC88D" KeyPath="yes" Source="$(var.ProductSourcePath)\psoptions.json" />
|
||||
<Component Id="cmp984B02E1363B4993BAC9682C731CD989">
|
||||
<File Id="filF898E820452E4F389BC2F67845BE33E1" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Management.Automation.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmp3CF3F69A352F4438B8F2F73EBBD12996">
|
||||
<File Id="filB8F63979F96B4007BA9C0CE6BD3531D0" KeyPath="yes" Source="$(var.ProductSourcePath)\Microsoft.Extensions.ObjectPool.dll" />
|
||||
<Component Id="cmp6909275A65834A26B63E65A603318E6B">
|
||||
<File Id="filA520FCB2903947C88A5727E46410C64E" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Threading.Tasks.Parallel.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmp09155DA101E1424B98832A789E93E835">
|
||||
<File Id="fil7D748565EBF5423A84CFC6D25D21F43C" KeyPath="yes" Source="$(var.ProductSourcePath)\Microsoft.Bcl.AsyncInterfaces.dll" />
|
||||
<Component Id="cmp670FEDCD3B894387B1218241D3ABF5BF">
|
||||
<File Id="filF10A1B1BB6B24CD2A93FE9946FDE9FA8" KeyPath="yes" Source="$(var.ProductSourcePath)\Microsoft.Bcl.AsyncInterfaces.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp22840874A8C84AA796496634FBEBF09C">
|
||||
<File Id="fil2067B616D1FA4B30932A0240ABE06089" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Web.Services.Description.dll" />
|
||||
<Component Id="cmp6A9A582ACF434EABB68BA974EA0E8FA6">
|
||||
<File Id="fil8EAB081902504DEEB69F63F1C0D8E4F9" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Linq.Expressions.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmpFB17CABA17334B2BBA1ED6CBF757B310">
|
||||
<File Id="fil1621E0132D2C49B89068166196075157" KeyPath="yes" Source="$(var.ProductSourcePath)\mscordaccore_$(var.FileArchitecture)_$(var.FileArchitecture)_6.0.21.52210.dll" />
|
||||
<Component Id="cmp67B18F0E514A4CD88BF6065FDD7C391F">
|
||||
<File Id="filA34975889FF54C909B99D25ED34C6D83" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Collections.Concurrent.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmp6FE19D3910154431837C656C36064B63">
|
||||
<File Id="filC7BE7EE1D4784CA0B4B90EC4C7ED185D" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Private.Uri.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmpDBD187269D2D4186A41A713EC7683CEB">
|
||||
<File Id="fil16B2347B9BA34A23B1A85E5D34A390E4" KeyPath="yes" Source="$(var.ProductSourcePath)\Microsoft.PowerShell.Commands.Diagnostics.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmpAA2BD7A70AD64FF8B2E936FE0C5EBD75">
|
||||
<File Id="fil20C17983865A40ED95686387A8EB008A" KeyPath="yes" Source="$(var.ProductSourcePath)\Newtonsoft.Json.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmpAE49B3D3824F450FA0770ED1C464ABBB">
|
||||
<File Id="fil47B6CE8B84524758AB4EB4D4FCCD26AB" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Runtime.Extensions.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmpF380A832B685454EB8A4D2C5DD653FA3">
|
||||
<File Id="fil4ABFCBF32E0D477CBE7A9C7BAD785E29" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Linq.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmp25ECB3E799DB47D7956096704C852073">
|
||||
<File Id="fil7BBCC4BE734F43E0B7F26B476CEA0447" KeyPath="yes" Source="$(var.ProductSourcePath)\Microsoft.PowerShell.GraphicalHost.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmpE82EB960D23C4B0B8E6EDE8607BDC8CE">
|
||||
<File Id="fil0BF91D431FA24D8DACBF2C2B3B590771" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Collections.Specialized.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmp3C5FC62966184DA796D865CA1F8C9475">
|
||||
<File Id="fil1E8D4BCB991C4BDF968EB8A85F1D4451" KeyPath="yes" Source="$(var.ProductSourcePath)\Microsoft.Extensions.ObjectPool.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp4F9B67EAA94B4336920DCD7FCD40F855">
|
||||
<File Id="filCF250A21ECC64000BD7749E549149E9C" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Text.Encoding.CodePages.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmpA88A7D59427446D3B990CFDE6D3AF8F3">
|
||||
<File Id="fil60A68AE7E67947828A0E61BE7F64E90D" KeyPath="yes" Source="$(var.ProductSourcePath)\System.IO.Pipes.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmp543152CC6CD240AF95B552EEEAD1E7ED">
|
||||
<File Id="filFF9E1C4FD72B4C0DBCA028372ED8F79C" KeyPath="yes" Source="$(var.ProductSourcePath)\Microsoft.Win32.Registry.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmp3A091FF1949A48649741692015B9BE64">
|
||||
<File Id="filE570F5D02B784A788B8F8EA3D77FE93D" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Threading.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmpE26675856E764571BD29FE0E76E697AF">
|
||||
<File Id="fil5ABA1D146101437F875F242EB76D8CCC" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Diagnostics.FileVersionInfo.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmpB2743C8558604296823423FEEA225CCF">
|
||||
<File Id="filFE797BAF781D460FBED9ADD5549BE49F" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Security.Principal.Windows.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmp6AA08D7B63DD4CAD9D88C9C8AE2CDF37">
|
||||
<File Id="filCBE331FA5D9341ED911F777DAF86BCBD" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Console.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmpF1A085062FF54621875BC9FBD00230AF">
|
||||
<File Id="filBE25B6E41B4F4A429B5F96547CFA85B1" KeyPath="yes" Source="$(var.ProductSourcePath)\Microsoft.PowerShell.Commands.Management.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmp81AA45B33E0945FF9C02783428E58836">
|
||||
<File Id="fil9D41E0672CB5457F81F4C692DFAA8BDF" KeyPath="yes" Source="$(var.ProductSourcePath)\pwsh.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmp5AF13794FA834B26A33F38730D8079F0">
|
||||
<File Id="fil03302F68618C4D51B784ADC9A1B1E7E2" KeyPath="yes" Source="$(var.ProductSourcePath)\Microsoft.CodeAnalysis.CSharp.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmp8C4B0C4FE6484EAFA967EFBFC12D3714">
|
||||
<File Id="fil7407BA5DBFB84916B9AACE5CD7492D67" KeyPath="yes" Source="$(var.ProductSourcePath)\Microsoft.CSharp.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmpF89DFC78B4B646DB82E37FAAD4469DDF">
|
||||
<File Id="filC8B378636F3C40A081FA09E460C3CCBB" KeyPath="yes" Source="$(var.ProductSourcePath)\Microsoft.WSMan.Runtime.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmpB6593C3BA7D94479A46272E405CAE45C">
|
||||
<File Id="fil81E5DFD53F5E4911AA7EE2076BE0E39F" KeyPath="yes" Source="$(var.ProductSourcePath)\Microsoft.PowerShell.Security.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmpB2267D52074B40D0A60ADBE5F72F5150">
|
||||
<File Id="fil31BFCF4F8E854B0D8736F0DAFED7E03E" KeyPath="yes" Source="$(var.ProductSourcePath)\Microsoft.ApplicationInsights.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmp76DBA9114F104B0E8C837410F26DB314">
|
||||
<File Id="fil1A233AC1614C4A16BAB36D4A057FA663" KeyPath="yes" Source="$(var.ProductSourcePath)\Microsoft.PowerShell.SDK.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmp3CB3A601EC574C42964D3491692BD03D">
|
||||
<File Id="filD88F16D4BCE341FAB0C1A9B480BFEE4B" KeyPath="yes" Source="$(var.ProductSourcePath)\Microsoft.PowerShell.CoreCLR.Eventing.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmpBBEE8A8136CE4975968A8E339690D93C">
|
||||
<File Id="fil2CB3CB1941734A5489386AEC520D4AC2" KeyPath="yes" Source="$(var.ProductSourcePath)\Microsoft.CodeAnalysis.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmp6A223E7391494FC3981E9D924AD46C73">
|
||||
<File Id="fil271B209F957049A1A0DE28981D3F8708" KeyPath="yes" Source="$(var.ProductSourcePath)\Microsoft.WSMan.Management.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmp18A85BABC75C46F7A70E8858E8C78A5D">
|
||||
<File Id="filC30FFFECAB304259B4DAD44DB637D42D" KeyPath="yes" Source="$(var.ProductSourcePath)\System.IO.FileSystem.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmpF58E7F94C2134471B6E827DAF7BCBB46">
|
||||
<File Id="filA81F71A3C9A44297A0A70EA5C4D6D8F3" KeyPath="yes" Source="$(var.ProductSourcePath)\Microsoft.PowerShell.Commands.Utility.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmp20B0BDC2CD2B472A9B190C3943396618">
|
||||
<File Id="filC4754CCD0C654AFFBFC8FE97A7481933" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Security.AccessControl.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmp085D4C77EF9144179C345E2393157347">
|
||||
<File Id="fil5BDBBC4AAA794F13A5BA3F2A4EACDD79" KeyPath="yes" Source="$(var.ProductSourcePath)\Microsoft.Management.Infrastructure.CimCmdlets.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmpFCC3AE8C34AD49FF8E164D4AA6CB9C26">
|
||||
<File Id="filCEFC390F24B54789BAE75D7BCC9518D8" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Collections.ni.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmpB02C9C68B6C74FAE920D735DE831325D">
|
||||
<File Id="filE12A650FBBCB4D718767ED92E68816C7" KeyPath="yes" Source="$(var.ProductSourcePath)\Microsoft.PowerShell.ConsoleHost.pdb" />
|
||||
</Component>
|
||||
<Component Id="cmpE7ECA5AD50B54F21A8BBEEB9CE56DA7C">
|
||||
<File Id="filE781E3659A7E4DA395EBF37099BC3441" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Diagnostics.Process.ni.pdb" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
</Fragment>
|
||||
|
@ -4119,57 +4164,72 @@
|
|||
<ComponentRef Id="cmpBB705B2570064C99A71B6FA65CDF9DC8" />
|
||||
<ComponentRef Id="cmpE9599A00802144DF98F5792E029C8875" />
|
||||
<ComponentRef Id="cmp0989343D60B74AF082291F612F0E6FA6" />
|
||||
<ComponentRef Id="cmp72C41225E0B4457C8CB5F4C5FE6E3187" />
|
||||
<ComponentRef Id="cmp0BD7D15E0377407FA4C43BFE89F0C12E" />
|
||||
<ComponentRef Id="cmpC0FFB3F4FB30438082D2DC0F4E4BF12D" />
|
||||
<ComponentRef Id="cmp1EBDE676D79B4B0DB859B3F601D78513" />
|
||||
<ComponentRef Id="cmpB92B70CEFC2F438386F97264FB436CDD" />
|
||||
<ComponentRef Id="cmpEE26930D65E346FDAE1B3E07F5DBEF77" />
|
||||
<ComponentRef Id="cmp8635213A03B04AAE8E1BFB7EA85E0DB2" />
|
||||
<ComponentRef Id="cmp834F3E0C83664E92B0D115A39A8FAACB" />
|
||||
<ComponentRef Id="cmp2BB002B115C247FFB3353C80CAAC10B3" />
|
||||
<ComponentRef Id="cmp68158D010ECB439582D041355BFACCBB" />
|
||||
<ComponentRef Id="cmp3547A55EA9D04784B4CF2FC717447E16" />
|
||||
<ComponentRef Id="cmp690F24F04C044127A61754363A4D63E3" />
|
||||
<ComponentRef Id="cmpFAD6557C4AEC48B89DDC4E6485C020C4" />
|
||||
<ComponentRef Id="cmpB5458B36303A472B80582AF1C2E7FB94" />
|
||||
<ComponentRef Id="cmp0EBD333D501A45089F58504074E229E7" />
|
||||
<ComponentRef Id="cmpD11E9CA5069045578BA5D89C86F7FDEF" />
|
||||
<ComponentRef Id="cmp708913639F7A46E784CC0FA862A1A2CE" />
|
||||
<ComponentRef Id="cmpA75DEF5617C54DA1937CB37D5824BF79" />
|
||||
<ComponentRef Id="cmp957498053E01454DA1E21E6D7317DCD6" />
|
||||
<ComponentRef Id="cmp408A3AF905EB47ADA35FBC5A6B1465A0" />
|
||||
<ComponentRef Id="cmpA6276F9EAB41411AAAEC496E67A3DBAE" />
|
||||
<ComponentRef Id="cmp91C27D1766E84B8BB0F0C70888F03C2E" />
|
||||
<ComponentRef Id="cmpCC4A42AA70EE4418926986F5A4B8D3FA" />
|
||||
<ComponentRef Id="cmp690BAC3241424F59B5D30DE0E846D03E" />
|
||||
<ComponentRef Id="cmp3CF3F69A352F4438B8F2F73EBBD12996" />
|
||||
<ComponentRef Id="cmp09155DA101E1424B98832A789E93E835" />
|
||||
<ComponentRef Id="cmpC8C68DB0DEE44CF49D98532D2C26395E" />
|
||||
<ComponentRef Id="cmpB43ED7BA30C844E2B5C38F7B747EEFDC" />
|
||||
<ComponentRef Id="cmpF3C18F07C6A148638CBC858EB02E3A6D" />
|
||||
<ComponentRef Id="cmp582595AE8291444E837793472E0A259C" />
|
||||
<ComponentRef Id="cmp2B8239B905B146A69CD5D55A353AC131" />
|
||||
<ComponentRef Id="cmpBD958F4B8F9146499DE2CA6321C65F96" />
|
||||
<ComponentRef Id="cmp166B17F72C954B0087DF991E560B399A" />
|
||||
<ComponentRef Id="cmp529A2B5343FD466884FAF627E37C648D" />
|
||||
<ComponentRef Id="cmp4EE1633EE4864CE5B9015BF76BD31D14" />
|
||||
<ComponentRef Id="cmpE7BE9D8F63E04798870E57BA1EABB9A5" />
|
||||
<ComponentRef Id="cmp5B67AE2852E04C26970FD2016CA76E07" />
|
||||
<ComponentRef Id="cmp6ADB50DF9F2D4BCA9E682AA6D1C7C03B" />
|
||||
<ComponentRef Id="cmpA8A66545C44F428BB552B55EEE353BB0" />
|
||||
<ComponentRef Id="cmp5492F78ACB1A4391BBED371FDFC06B9E" />
|
||||
<ComponentRef Id="cmp22840874A8C84AA796496634FBEBF09C" />
|
||||
<ComponentRef Id="cmp0173AE0CBFA44C269D93361F6C98F99B" />
|
||||
<ComponentRef Id="cmpFB17CABA17334B2BBA1ED6CBF757B310" />
|
||||
<ComponentRef Id="cmpD55F08F6CF51498E9E8551067BA57040" />
|
||||
<ComponentRef Id="cmp777DF202EF2542F2ACFCCF0481E8D6EE" />
|
||||
<ComponentRef Id="cmpF24D3B9F29F84B4D9C47577B7926FC2E" />
|
||||
<ComponentRef Id="cmp3B07F4E4B6034F3284288C18F4638CA7" />
|
||||
<ComponentRef Id="cmp9FCFAEB797D9475C873E21B4B5A89E28" />
|
||||
<ComponentRef Id="cmp0C4751F9D5C14419A45F234152D21DA9" />
|
||||
<ComponentRef Id="cmpF96C036EAE3B436DB096888697193FAF" />
|
||||
<ComponentRef Id="cmp789F545EA2CB4AC5A2688CF730A5F6B4" />
|
||||
<ComponentRef Id="cmp2EB55EB6B44F4CF186F0BAFD6B33BCD6" />
|
||||
<ComponentRef Id="cmp984B02E1363B4993BAC9682C731CD989" />
|
||||
<ComponentRef Id="cmpBF98B0006F8542FF978542764EB56D52" />
|
||||
<ComponentRef Id="cmp6909275A65834A26B63E65A603318E6B" />
|
||||
<ComponentRef Id="cmp0C47328F9CCE4CC0B89D70C0F43F03E4" />
|
||||
<ComponentRef Id="cmp670FEDCD3B894387B1218241D3ABF5BF" />
|
||||
<ComponentRef Id="cmp6A9A582ACF434EABB68BA974EA0E8FA6" />
|
||||
<ComponentRef Id="cmp67B18F0E514A4CD88BF6065FDD7C391F" />
|
||||
<ComponentRef Id="cmp50C7C43130D843E98E33E3A5776E3C73" />
|
||||
<ComponentRef Id="cmpAFD9FDD8CE8947B89381E43EC88A75A2" />
|
||||
<ComponentRef Id="cmp6FE19D3910154431837C656C36064B63" />
|
||||
<ComponentRef Id="cmpDBD187269D2D4186A41A713EC7683CEB" />
|
||||
<ComponentRef Id="cmpAA2BD7A70AD64FF8B2E936FE0C5EBD75" />
|
||||
<ComponentRef Id="cmp474CC87075C94683829B02B2DE9D69C2" />
|
||||
<ComponentRef Id="cmpAE49B3D3824F450FA0770ED1C464ABBB" />
|
||||
<ComponentRef Id="cmp6C427F4049C14D19A0C37B8A18C109B7" />
|
||||
<ComponentRef Id="cmpF380A832B685454EB8A4D2C5DD653FA3" />
|
||||
<ComponentRef Id="cmp0646771B60E943FAB07C93E038178F70" />
|
||||
<ComponentRef Id="cmp25ECB3E799DB47D7956096704C852073" />
|
||||
<ComponentRef Id="cmpE82EB960D23C4B0B8E6EDE8607BDC8CE" />
|
||||
<ComponentRef Id="cmp3C5FC62966184DA796D865CA1F8C9475" />
|
||||
<ComponentRef Id="cmp4F9B67EAA94B4336920DCD7FCD40F855" />
|
||||
<ComponentRef Id="cmpA88A7D59427446D3B990CFDE6D3AF8F3" />
|
||||
<ComponentRef Id="cmp543152CC6CD240AF95B552EEEAD1E7ED" />
|
||||
<ComponentRef Id="cmp3A091FF1949A48649741692015B9BE64" />
|
||||
<ComponentRef Id="cmpE26675856E764571BD29FE0E76E697AF" />
|
||||
<ComponentRef Id="cmpB2743C8558604296823423FEEA225CCF" />
|
||||
<ComponentRef Id="cmp6AA08D7B63DD4CAD9D88C9C8AE2CDF37" />
|
||||
<ComponentRef Id="cmpF1A085062FF54621875BC9FBD00230AF" />
|
||||
<ComponentRef Id="cmp81AA45B33E0945FF9C02783428E58836" />
|
||||
<ComponentRef Id="cmpA489A6DFC6E9415E8FBFCE6C661ACCB4" />
|
||||
<ComponentRef Id="cmpC73BF895808E42489E3F3510C62229F6" />
|
||||
<ComponentRef Id="cmp5AF13794FA834B26A33F38730D8079F0" />
|
||||
<ComponentRef Id="cmp8C4B0C4FE6484EAFA967EFBFC12D3714" />
|
||||
<ComponentRef Id="cmpF89DFC78B4B646DB82E37FAAD4469DDF" />
|
||||
<ComponentRef Id="cmpB6593C3BA7D94479A46272E405CAE45C" />
|
||||
<ComponentRef Id="cmpB2267D52074B40D0A60ADBE5F72F5150" />
|
||||
<ComponentRef Id="cmp839164626FE5471793C7375623442686" />
|
||||
<ComponentRef Id="cmp76DBA9114F104B0E8C837410F26DB314" />
|
||||
<ComponentRef Id="cmp3CB3A601EC574C42964D3491692BD03D" />
|
||||
<ComponentRef Id="cmpBBEE8A8136CE4975968A8E339690D93C" />
|
||||
<ComponentRef Id="cmp6A223E7391494FC3981E9D924AD46C73" />
|
||||
<ComponentRef Id="cmp18A85BABC75C46F7A70E8858E8C78A5D" />
|
||||
<ComponentRef Id="cmp1940ECC1F3D4430088BEF3D8B88392A0" />
|
||||
<ComponentRef Id="cmp45AF8A57AB984B09B6C0F533CA65A419" />
|
||||
<ComponentRef Id="cmpF58E7F94C2134471B6E827DAF7BCBB46" />
|
||||
<ComponentRef Id="cmp20B0BDC2CD2B472A9B190C3943396618" />
|
||||
<ComponentRef Id="cmp085D4C77EF9144179C345E2393157347" />
|
||||
<ComponentRef Id="cmp0AD152BE1EE94B3799D1DC33132BDAC9" />
|
||||
<ComponentRef Id="cmpFCC3AE8C34AD49FF8E164D4AA6CB9C26" />
|
||||
<ComponentRef Id="cmpB02C9C68B6C74FAE920D735DE831325D" />
|
||||
<ComponentRef Id="cmpE7ECA5AD50B54F21A8BBEEB9CE56DA7C" />
|
||||
</ComponentGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
|
|
399
build.psm1
399
build.psm1
|
@ -6,8 +6,6 @@ param(
|
|||
[parameter(Mandatory = $false)][switch]$SkipLinuxDistroCheck = $false
|
||||
)
|
||||
|
||||
. "$PSScriptRoot\tools\buildCommon\startNativeExecution.ps1"
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
|
||||
# On Unix paths is separated by colon
|
||||
|
@ -18,8 +16,6 @@ $script:Options = $null
|
|||
$dotnetMetadata = Get-Content $PSScriptRoot/DotnetRuntimeMetadata.json | ConvertFrom-Json
|
||||
$dotnetCLIChannel = $dotnetMetadata.Sdk.Channel
|
||||
$dotnetCLIQuality = $dotnetMetadata.Sdk.Quality
|
||||
$dotnetAzureFeed = $dotnetMetadata.Sdk.azureFeed
|
||||
$dotnetSDKVersionOveride = $dotnetMetadata.Sdk.sdkImageOverride
|
||||
$dotnetCLIRequiredVersion = $(Get-Content $PSScriptRoot/global.json | ConvertFrom-Json).Sdk.Version
|
||||
|
||||
# Track if tags have been sync'ed
|
||||
|
@ -318,6 +314,8 @@ function Start-PSBuild {
|
|||
[ValidateSet('Debug', 'Release', 'CodeCoverage', '')] # We might need "Checked" as well
|
||||
[string]$Configuration,
|
||||
|
||||
[switch]$CrossGen,
|
||||
|
||||
[ValidatePattern("^v\d+\.\d+\.\d+(-\w+(\.\d{1,2})?)?$")]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$ReleaseTag,
|
||||
|
@ -345,6 +343,10 @@ function Start-PSBuild {
|
|||
}
|
||||
|
||||
if ($ForMinimalSize) {
|
||||
if ($CrossGen) {
|
||||
throw "Build for the minimal size requires the minimal disk footprint, so `CrossGen` is not allowed"
|
||||
}
|
||||
|
||||
if ($Runtime -and "linux-x64", "win7-x64", "osx-x64" -notcontains $Runtime) {
|
||||
throw "Build for the minimal size is enabled only for following runtimes: 'linux-x64', 'win7-x64', 'osx-x64'"
|
||||
}
|
||||
|
@ -390,8 +392,7 @@ function Start-PSBuild {
|
|||
}
|
||||
|
||||
# Verify if the dotnet in-use is the required version
|
||||
$dotnetCLIInstalledVersion = Get-LatestInstalledSDK
|
||||
|
||||
$dotnetCLIInstalledVersion = Start-NativeExecution -sb { dotnet --version } -IgnoreExitcode
|
||||
If ($dotnetCLIInstalledVersion -ne $dotnetCLIRequiredVersion) {
|
||||
Write-Warning @"
|
||||
The currently installed .NET Command Line Tools is not the required version.
|
||||
|
@ -413,6 +414,7 @@ Fix steps:
|
|||
|
||||
# set output options
|
||||
$OptionsArguments = @{
|
||||
CrossGen=$CrossGen
|
||||
Output=$Output
|
||||
Runtime=$Runtime
|
||||
Configuration=$Configuration
|
||||
|
@ -439,10 +441,6 @@ Fix steps:
|
|||
# Add --self-contained due to "warning NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used."
|
||||
if ($Options.Runtime -like 'fxdependent*') {
|
||||
$Arguments += "--no-self-contained"
|
||||
# The UseAppHost = false property avoids creating ".exe" for the fxdependent packages.
|
||||
# The ".exe" is not a cross-platform executable, but specific to the platform that it was built on.
|
||||
# We do not need to ship that.
|
||||
$Arguments += "/property:UseAppHost=false"
|
||||
}
|
||||
else {
|
||||
$Arguments += "--self-contained"
|
||||
|
@ -527,6 +525,12 @@ Fix steps:
|
|||
Write-Log -message "Run dotnet $Arguments from $PWD"
|
||||
Start-NativeExecution { dotnet $Arguments }
|
||||
Write-Log -message "PowerShell output: $($Options.Output)"
|
||||
|
||||
if ($CrossGen) {
|
||||
# fxdependent package cannot be CrossGen'ed
|
||||
Start-CrossGen -PublishPath $publishPath -Runtime $script:Options.Runtime
|
||||
Write-Log -message "pwsh.exe with ngen binaries is available at: $($Options.Output)"
|
||||
}
|
||||
} else {
|
||||
$globalToolSrcFolder = Resolve-Path (Join-Path $Options.Top "../Microsoft.PowerShell.GlobalTool.Shim") | Select-Object -ExpandProperty Path
|
||||
|
||||
|
@ -829,6 +833,8 @@ function New-PSOptions {
|
|||
"win7-x86")]
|
||||
[string]$Runtime,
|
||||
|
||||
[switch]$CrossGen,
|
||||
|
||||
# Accept a path to the output directory
|
||||
# If not null or empty, name of the executable will be appended to
|
||||
# this path, otherwise, to the default path, and then the full path
|
||||
|
@ -934,6 +940,7 @@ function New-PSOptions {
|
|||
-RootInfo ([PSCustomObject]$RootInfo) `
|
||||
-Top $Top `
|
||||
-Runtime $Runtime `
|
||||
-Crossgen $Crossgen.IsPresent `
|
||||
-Configuration $Configuration `
|
||||
-PSModuleRestore $PSModuleRestore.IsPresent `
|
||||
-Framework $Framework `
|
||||
|
@ -1751,13 +1758,6 @@ function Install-Dotnet {
|
|||
[string]$FeedCredential
|
||||
)
|
||||
|
||||
Write-Verbose -Verbose "In install-dotnet"
|
||||
|
||||
# This is needed workaround for RTM pre-release build as the SDK version is always 6.0.100 after installation for every pre-release
|
||||
if ($dotnetCLIRequiredVersion -like '6.0.100-rtm.*') {
|
||||
$dotnetCLIRequiredVersion = '6.0.100'
|
||||
}
|
||||
|
||||
# This allows sudo install to be optional; needed when running in containers / as root
|
||||
# Note that when it is null, Invoke-Expression (but not &) must be used to interpolate properly
|
||||
$sudo = if (!$NoSudo) { "sudo" }
|
||||
|
@ -1785,12 +1785,10 @@ function Install-Dotnet {
|
|||
Write-Warning "This script only removes prior versions of dotnet for Ubuntu and OS X"
|
||||
}
|
||||
|
||||
Write-Verbose -Verbose "Invoking install script"
|
||||
|
||||
# Install new dotnet 1.1.0 preview packages
|
||||
$installScript = "dotnet-install.sh"
|
||||
|
||||
Write-Verbose -Message "downloading install script from $installObtainUrl/$installScript ..." -Verbose
|
||||
Start-NativeExecution {
|
||||
Write-Verbose -Message "downloading install script from $installObtainUrl/$installScript ..." -Verbose
|
||||
& $wget $installObtainUrl/$installScript
|
||||
|
||||
if ((Get-ChildItem "./$installScript").Length -eq 0) {
|
||||
|
@ -1809,16 +1807,9 @@ function Install-Dotnet {
|
|||
}
|
||||
|
||||
if ($AzureFeed) {
|
||||
$bashArgs += @('-AzureFeed', $AzureFeed)
|
||||
$bashArgs += @('-AzureFeed', $AzureFeed, '-FeedCredential', $FeedCredential)
|
||||
}
|
||||
|
||||
if ($FeedCredential) {
|
||||
$bashArgs += @('-FeedCredential', $FeedCredential)
|
||||
}
|
||||
|
||||
$bashArgs | Out-String | Write-Verbose -Verbose
|
||||
|
||||
Start-NativeExecution {
|
||||
bash @bashArgs
|
||||
}
|
||||
} elseif ($environment.IsWindows) {
|
||||
|
@ -1841,44 +1832,35 @@ function Install-Dotnet {
|
|||
}
|
||||
|
||||
if ($AzureFeed) {
|
||||
$installArgs += @{AzureFeed = $AzureFeed}
|
||||
$installArgs += @{
|
||||
AzureFeed = $AzureFeed
|
||||
$FeedCredential = $FeedCredential
|
||||
}
|
||||
}
|
||||
|
||||
if ($FeedCredential) {
|
||||
$installArgs += @{FeedCredential = $FeedCredential}
|
||||
}
|
||||
|
||||
$installArgs | Out-String | Write-Verbose -Verbose
|
||||
|
||||
& ./$installScript @installArgs
|
||||
}
|
||||
else {
|
||||
# dotnet-install.ps1 uses APIs that are not supported in .NET Core, so we run it with Windows PowerShell
|
||||
$fullPSPath = Join-Path -Path $env:windir -ChildPath "System32\WindowsPowerShell\v1.0\powershell.exe"
|
||||
$fullDotnetInstallPath = Join-Path -Path $PWD.Path -ChildPath $installScript
|
||||
|
||||
if ($Version) {
|
||||
$psArgs = @('-NoLogo', '-NoProfile', '-File', $fullDotnetInstallPath, '-Version', $Version, '-Quality', $Quality)
|
||||
}
|
||||
elseif ($Channel) {
|
||||
$psArgs = @('-NoLogo', '-NoProfile', '-File', $fullDotnetInstallPath, '-Channel', $Channel, '-Quality', $Quality)
|
||||
}
|
||||
|
||||
if ($InstallDir) {
|
||||
$psArgs += @('-InstallDir', $InstallDir)
|
||||
}
|
||||
|
||||
if ($AzureFeed) {
|
||||
$psArgs += @('-AzureFeed', $AzureFeed)
|
||||
}
|
||||
|
||||
if ($FeedCredential) {
|
||||
$psArgs += @('-FeedCredential', $FeedCredential)
|
||||
}
|
||||
|
||||
$psArgs | Out-String | Write-Verbose -Verbose
|
||||
|
||||
Start-NativeExecution {
|
||||
|
||||
if ($Version) {
|
||||
$psArgs = @('-NoLogo', '-NoProfile', '-File', $fullDotnetInstallPath, '-Version', $Version, '-Quality', $Quality)
|
||||
}
|
||||
elseif ($Channel) {
|
||||
$psArgs = @('-NoLogo', '-NoProfile', '-File', $fullDotnetInstallPath, '-Channel', $Channel, '-Quality', $Quality)
|
||||
}
|
||||
|
||||
if ($InstallDir) {
|
||||
$psArgs += @('-InstallDir', $InstallDir)
|
||||
}
|
||||
|
||||
if ($AzureFeed) {
|
||||
$psArgs += @('-AzureFeed', $AzureFeed, '-FeedCredential', $FeedCredential)
|
||||
}
|
||||
|
||||
& $fullPSPath @psArgs
|
||||
}
|
||||
}
|
||||
|
@ -1912,10 +1894,6 @@ function Start-PSBootstrap {
|
|||
|
||||
Push-Location $PSScriptRoot/tools
|
||||
|
||||
if ($dotnetSDKVersionOveride) {
|
||||
$Version = $dotnetSDKVersionOveride
|
||||
}
|
||||
|
||||
try {
|
||||
if ($environment.IsLinux -or $environment.IsMacOS) {
|
||||
# This allows sudo install to be optional; needed when running in containers / as root
|
||||
|
@ -2013,9 +1991,6 @@ function Start-PSBootstrap {
|
|||
# Build tools
|
||||
$Deps += "cmake"
|
||||
|
||||
# wget for downloading dotnet
|
||||
$Deps += "wget"
|
||||
|
||||
# .NET Core required runtime libraries
|
||||
$Deps += "openssl"
|
||||
|
||||
|
@ -2023,7 +1998,7 @@ function Start-PSBootstrap {
|
|||
# ignore exitcode, because they may be already installed
|
||||
Start-NativeExecution ([ScriptBlock]::Create("$PackageManager install $Deps")) -IgnoreExitcode
|
||||
} elseif ($environment.IsLinux -and $environment.IsAlpine) {
|
||||
$Deps += 'libunwind', 'libcurl', 'bash', 'cmake', 'clang', 'build-base', 'git', 'curl', 'wget'
|
||||
$Deps += 'libunwind', 'libcurl', 'bash', 'cmake', 'clang', 'build-base', 'git', 'curl'
|
||||
|
||||
Start-NativeExecution {
|
||||
Invoke-Expression "apk add $Deps"
|
||||
|
@ -2048,18 +2023,14 @@ function Start-PSBootstrap {
|
|||
}
|
||||
}
|
||||
|
||||
Write-Verbose -Verbose "Calling Find-Dotnet from Start-PSBootstrap"
|
||||
|
||||
# Try to locate dotnet-SDK before installing it
|
||||
Find-Dotnet
|
||||
|
||||
Write-Verbose -Verbose "Back from calling Find-Dotnet from Start-PSBootstrap"
|
||||
|
||||
# Install dotnet-SDK
|
||||
$dotNetExists = precheck 'dotnet' $null
|
||||
$dotNetVersion = [string]::Empty
|
||||
if($dotNetExists) {
|
||||
$dotNetVersion = Get-LatestInstalledSDK
|
||||
$dotNetVersion = Start-NativeExecution -sb { dotnet --version } -IgnoreExitcode
|
||||
}
|
||||
|
||||
if(!$dotNetExists -or $dotNetVersion -ne $dotnetCLIRequiredVersion -or $Force.IsPresent) {
|
||||
|
@ -2074,12 +2045,6 @@ function Start-PSBootstrap {
|
|||
}
|
||||
|
||||
$DotnetArguments = @{ Channel=$Channel; Version=$Version; NoSudo=$NoSudo }
|
||||
|
||||
if ($dotnetAzureFeed) {
|
||||
$null = $DotnetArguments.Add("AzureFeed", $dotnetAzureFeed)
|
||||
$null = $DotnetArguments.Add("FeedCredential", $null)
|
||||
}
|
||||
|
||||
Install-Dotnet @DotnetArguments
|
||||
}
|
||||
else {
|
||||
|
@ -2101,12 +2066,6 @@ function Start-PSBootstrap {
|
|||
}
|
||||
}
|
||||
|
||||
function Get-LatestInstalledSDK {
|
||||
Start-NativeExecution -sb {
|
||||
dotnet --list-sdks | Select-String -Pattern '\d*.\d*.\d*(-\w*\.\d*)?' | ForEach-Object { [System.Management.Automation.SemanticVersion]::new($_.matches.value) } | Sort-Object -Descending | Select-Object -First 1
|
||||
} -IgnoreExitcode 2> $null
|
||||
}
|
||||
|
||||
function Start-DevPowerShell {
|
||||
[CmdletBinding(DefaultParameterSetName='ConfigurationParamSet')]
|
||||
param(
|
||||
|
@ -2239,29 +2198,17 @@ function Start-ResGen
|
|||
}
|
||||
|
||||
function Find-Dotnet() {
|
||||
Write-Verbose -Verbose "In Find-DotNet"
|
||||
|
||||
$originalPath = $env:PATH
|
||||
$dotnetPath = if ($environment.IsWindows) { "$env:LocalAppData\Microsoft\dotnet" } else { "$env:HOME/.dotnet" }
|
||||
|
||||
$chosenDotNetVersion = if($dotnetSDKVersionOveride) {
|
||||
$dotnetSDKVersionOveride
|
||||
}
|
||||
else {
|
||||
$dotnetCLIRequiredVersion
|
||||
}
|
||||
|
||||
# If there dotnet is already in the PATH, check to see if that version of dotnet can find the required SDK
|
||||
# This is "typically" the globally installed dotnet
|
||||
if (precheck dotnet) {
|
||||
# Must run from within repo to ensure global.json can specify the required SDK version
|
||||
Push-Location $PSScriptRoot
|
||||
$dotnetCLIInstalledVersion = Get-LatestInstalledSDK
|
||||
$dotnetCLIInstalledVersion = Start-NativeExecution -sb { dotnet --version } -IgnoreExitcode 2> $null
|
||||
Pop-Location
|
||||
|
||||
Write-Verbose -Verbose "dotnetCLIInstalledVersion = $dotnetCLIInstalledVersion`nchosenDotNetVersion = $chosenDotNetVersion"
|
||||
|
||||
if ($dotnetCLIInstalledVersion -ne $chosenDotNetVersion) {
|
||||
if ($dotnetCLIInstalledVersion -ne $dotnetCLIRequiredVersion) {
|
||||
Write-Warning "The 'dotnet' in the current path can't find SDK version ${dotnetCLIRequiredVersion}, prepending $dotnetPath to PATH."
|
||||
# Globally installed dotnet doesn't have the required SDK version, prepend the user local dotnet location
|
||||
$env:PATH = $dotnetPath + [IO.Path]::PathSeparator + $env:PATH
|
||||
|
@ -2359,6 +2306,258 @@ function script:precheck([string]$command, [string]$missedMessage) {
|
|||
}
|
||||
}
|
||||
|
||||
# this function wraps native command Execution
|
||||
# for more information, read https://mnaoumov.wordpress.com/2015/01/11/execution-of-external-commands-in-powershell-done-right/
|
||||
function script:Start-NativeExecution
|
||||
{
|
||||
param(
|
||||
[scriptblock]$sb,
|
||||
[switch]$IgnoreExitcode,
|
||||
[switch]$VerboseOutputOnError
|
||||
)
|
||||
$backupEAP = $ErrorActionPreference
|
||||
$ErrorActionPreference = "Continue"
|
||||
try {
|
||||
if($VerboseOutputOnError.IsPresent)
|
||||
{
|
||||
$output = & $sb 2>&1
|
||||
}
|
||||
else
|
||||
{
|
||||
& $sb
|
||||
}
|
||||
|
||||
# note, if $sb doesn't have a native invocation, $LASTEXITCODE will
|
||||
# point to the obsolete value
|
||||
if ($LASTEXITCODE -ne 0 -and -not $IgnoreExitcode) {
|
||||
if($VerboseOutputOnError.IsPresent -and $output)
|
||||
{
|
||||
$output | Out-String | Write-Verbose -Verbose
|
||||
}
|
||||
|
||||
# Get caller location for easier debugging
|
||||
$caller = Get-PSCallStack -ErrorAction SilentlyContinue
|
||||
if($caller)
|
||||
{
|
||||
$callerLocationParts = $caller[1].Location -split ":\s*line\s*"
|
||||
$callerFile = $callerLocationParts[0]
|
||||
$callerLine = $callerLocationParts[1]
|
||||
|
||||
$errorMessage = "Execution of {$sb} by ${callerFile}: line $callerLine failed with exit code $LASTEXITCODE"
|
||||
throw $errorMessage
|
||||
}
|
||||
throw "Execution of {$sb} failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
} finally {
|
||||
$ErrorActionPreference = $backupEAP
|
||||
}
|
||||
}
|
||||
|
||||
function Start-CrossGen {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory= $true)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[String]
|
||||
$PublishPath,
|
||||
|
||||
[Parameter(Mandatory=$true)]
|
||||
[ValidateSet("alpine-x64",
|
||||
"linux-arm",
|
||||
"linux-arm64",
|
||||
"linux-x64",
|
||||
"osx-arm64",
|
||||
"osx-x64",
|
||||
"win-arm",
|
||||
"win-arm64",
|
||||
"win7-x64",
|
||||
"win7-x86")]
|
||||
[string]
|
||||
$Runtime
|
||||
)
|
||||
|
||||
function New-CrossGenAssembly {
|
||||
param (
|
||||
[Parameter(Mandatory = $true)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[String[]]
|
||||
$AssemblyPath,
|
||||
|
||||
[Parameter(Mandatory = $true)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[String]
|
||||
$CrossgenPath,
|
||||
|
||||
[Parameter(Mandatory = $true)]
|
||||
[ValidateSet("alpine-x64",
|
||||
"linux-arm",
|
||||
"linux-arm64",
|
||||
"linux-x64",
|
||||
"osx-arm64",
|
||||
"osx-x64",
|
||||
"win-arm",
|
||||
"win-arm64",
|
||||
"win7-x64",
|
||||
"win7-x86")]
|
||||
[string]
|
||||
$Runtime
|
||||
)
|
||||
|
||||
$platformAssembliesPath = Split-Path $AssemblyPath[0] -Parent
|
||||
|
||||
$targetOS, $targetArch = $Runtime -split '-'
|
||||
|
||||
# Special cases where OS / Arch does not conform with runtime names
|
||||
switch ($Runtime) {
|
||||
'alpine-x64' {
|
||||
$targetOS = 'linux'
|
||||
$targetArch = 'x64'
|
||||
}
|
||||
'win-arm' {
|
||||
$targetOS = 'windows'
|
||||
$targetArch = 'arm'
|
||||
}
|
||||
'win-arm64' {
|
||||
$targetOS = 'windows'
|
||||
$targetArch = 'arm64'
|
||||
}
|
||||
'win7-x64' {
|
||||
$targetOS = 'windows'
|
||||
$targetArch = 'x64'
|
||||
}
|
||||
'win7-x86' {
|
||||
$targetOS = 'windows'
|
||||
$targetArch = 'x86'
|
||||
}
|
||||
}
|
||||
|
||||
$generatePdb = $targetos -eq 'windows'
|
||||
|
||||
# The path to folder must end with directory separator
|
||||
$dirSep = [System.IO.Path]::DirectorySeparatorChar
|
||||
$platformAssembliesPath = if (-not $platformAssembliesPath.EndsWith($dirSep)) { $platformAssembliesPath + $dirSep }
|
||||
|
||||
Start-NativeExecution {
|
||||
$crossgen2Params = @(
|
||||
"-r"
|
||||
$platformAssembliesPath
|
||||
"--out-near-input"
|
||||
"--single-file-compilation"
|
||||
"-O"
|
||||
"--targetos"
|
||||
$targetOS
|
||||
"--targetarch"
|
||||
$targetArch
|
||||
)
|
||||
|
||||
if ($generatePdb) {
|
||||
$crossgen2Params += "--pdb"
|
||||
}
|
||||
|
||||
$crossgen2Params += $AssemblyPath
|
||||
|
||||
& $CrossgenPath $crossgen2Params
|
||||
}
|
||||
}
|
||||
|
||||
if (-not (Test-Path $PublishPath)) {
|
||||
throw "Path '$PublishPath' does not exist."
|
||||
}
|
||||
|
||||
# Get the path to crossgen
|
||||
$crossGenExe = if ($environment.IsWindows) { "crossgen2.exe" } else { "crossgen2" }
|
||||
|
||||
# The crossgen tool is only published for these particular runtimes
|
||||
$crossGenRuntime = if ($environment.IsWindows) {
|
||||
# for windows the tool architecture is the host machine architecture, so it is always x64.
|
||||
# we can cross compile for x86, arm and arm64
|
||||
"win-x64"
|
||||
} else {
|
||||
$Runtime
|
||||
}
|
||||
|
||||
if (-not $crossGenRuntime) {
|
||||
throw "crossgen is not available for this platform"
|
||||
}
|
||||
|
||||
$dotnetRuntimeVersion = $script:Options.Framework -replace 'net'
|
||||
|
||||
# Get the CrossGen.exe for the correct runtime with the latest version
|
||||
$crossGenPath = Get-ChildItem $script:Environment.nugetPackagesRoot $crossGenExe -Recurse | `
|
||||
Where-Object { $_.FullName -match $crossGenRuntime } | `
|
||||
Where-Object { $_.FullName -match $dotnetRuntimeVersion } | `
|
||||
Where-Object { (Split-Path $_.FullName -Parent).EndsWith('tools') } | `
|
||||
Sort-Object -Property FullName -Descending | `
|
||||
Select-Object -First 1 | `
|
||||
ForEach-Object { $_.FullName }
|
||||
if (-not $crossGenPath) {
|
||||
throw "Unable to find latest version of crossgen2.exe. 'Please run Start-PSBuild -Clean' first, and then try again."
|
||||
}
|
||||
Write-Verbose "Matched CrossGen2.exe: $crossGenPath" -Verbose
|
||||
|
||||
# Common assemblies used by Add-Type or assemblies with high JIT and no pdbs to crossgen
|
||||
$commonAssembliesForAddType = @(
|
||||
"Microsoft.CodeAnalysis.CSharp.dll"
|
||||
"Microsoft.CodeAnalysis.dll"
|
||||
"System.Linq.Expressions.dll"
|
||||
"Microsoft.CSharp.dll"
|
||||
"System.Runtime.Extensions.dll"
|
||||
"System.Linq.dll"
|
||||
"System.Collections.Concurrent.dll"
|
||||
"System.Collections.dll"
|
||||
"Newtonsoft.Json.dll"
|
||||
"System.IO.FileSystem.dll"
|
||||
"System.Diagnostics.Process.dll"
|
||||
"System.Threading.Tasks.Parallel.dll"
|
||||
"System.Security.AccessControl.dll"
|
||||
"System.Text.Encoding.CodePages.dll"
|
||||
"System.Private.Uri.dll"
|
||||
"System.Threading.dll"
|
||||
"System.Security.Principal.Windows.dll"
|
||||
"System.Console.dll"
|
||||
"Microsoft.Win32.Registry.dll"
|
||||
"System.IO.Pipes.dll"
|
||||
"System.Diagnostics.FileVersionInfo.dll"
|
||||
"System.Collections.Specialized.dll"
|
||||
"Microsoft.ApplicationInsights.dll"
|
||||
)
|
||||
|
||||
$fullAssemblyList = $commonAssembliesForAddType
|
||||
|
||||
$assemblyFullPaths = @()
|
||||
$assemblyFullPaths += foreach ($assemblyName in $fullAssemblyList) {
|
||||
Join-Path $PublishPath $assemblyName
|
||||
}
|
||||
|
||||
New-CrossGenAssembly -CrossgenPath $crossGenPath -AssemblyPath $assemblyFullPaths -Runtime $Runtime
|
||||
|
||||
#
|
||||
# With the latest dotnet.exe, the default load context is only able to load TPAs, and TPA
|
||||
# only contains IL assembly names. In order to make the default load context able to load
|
||||
# the NI PS assemblies, we need to replace the IL PS assemblies with the corresponding NI
|
||||
# PS assemblies, but with the same IL assembly names.
|
||||
#
|
||||
Write-Verbose "PowerShell Ngen assemblies have been generated. Deploying ..." -Verbose
|
||||
foreach ($assemblyName in $fullAssemblyList) {
|
||||
|
||||
# Remove the IL assembly and its symbols.
|
||||
$assemblyPath = Join-Path $PublishPath $assemblyName
|
||||
$symbolsPath = [System.IO.Path]::ChangeExtension($assemblyPath, ".pdb")
|
||||
|
||||
Remove-Item $assemblyPath -Force -ErrorAction Stop
|
||||
|
||||
# Rename the corresponding ni.dll assembly to be the same as the IL assembly
|
||||
$niAssemblyPath = [System.IO.Path]::ChangeExtension($assemblyPath, "ni.dll")
|
||||
Rename-Item $niAssemblyPath $assemblyPath -Force -ErrorAction Stop
|
||||
|
||||
# No symbols are available for Microsoft.CodeAnalysis.CSharp.dll, Microsoft.CodeAnalysis.dll,
|
||||
# Microsoft.CodeAnalysis.VisualBasic.dll, and Microsoft.CSharp.dll.
|
||||
if ($commonAssembliesForAddType -notcontains $assemblyName) {
|
||||
Remove-Item $symbolsPath -Force -ErrorAction Stop
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Cleans the PowerShell repo - everything but the root folder
|
||||
function Clear-PSRepo
|
||||
{
|
||||
|
@ -2881,6 +3080,7 @@ function Restore-PSOptions {
|
|||
-RootInfo $options.RootInfo `
|
||||
-Top $options.Top `
|
||||
-Runtime $options.Runtime `
|
||||
-Crossgen $options.Crossgen `
|
||||
-Configuration $options.Configuration `
|
||||
-PSModuleRestore $options.PSModuleRestore `
|
||||
-Framework $options.Framework `
|
||||
|
@ -2904,6 +3104,10 @@ function New-PSOptionsObject
|
|||
[String]
|
||||
$Runtime,
|
||||
|
||||
[Parameter(Mandatory)]
|
||||
[Bool]
|
||||
$CrossGen,
|
||||
|
||||
[Parameter(Mandatory)]
|
||||
[String]
|
||||
$Configuration,
|
||||
|
@ -2932,6 +3136,7 @@ function New-PSOptionsObject
|
|||
Framework = $Framework
|
||||
Runtime = $Runtime
|
||||
Output = $Output
|
||||
CrossGen = $CrossGen
|
||||
PSModuleRestore = $PSModuleRestore
|
||||
ForMinimalSize = $ForMinimalSize
|
||||
}
|
||||
|
|
1424
cgmanifest.json
1424
cgmanifest.json
File diff suppressed because it is too large
Load diff
25
docker/tests/README.md
Normal file
25
docker/tests/README.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Docker tests
|
||||
|
||||
## Windows and Linux containers
|
||||
|
||||
The tests must be run separately on the Windows and Linux docker daemons. You can use the Linux docker daemon on Windows, but that will only test Linux containers not Windows Containers.
|
||||
|
||||
## To building and basic behavior of the containers
|
||||
|
||||
```PowerShell
|
||||
Invoke-Pester
|
||||
```
|
||||
|
||||
Note: be sure to do this using both the Windows and Linux docker daemon.
|
||||
|
||||
## To test the productions containers
|
||||
|
||||
```PowerShell
|
||||
Invoke-Pester -Tag Behavior
|
||||
```
|
||||
|
||||
## To test only building the containers
|
||||
|
||||
```PowerShell
|
||||
Invoke-Pester -Tag Build
|
||||
```
|
23
docker/tests/Templates/centos7/Dockerfile
Normal file
23
docker/tests/Templates/centos7/Dockerfile
Normal file
|
@ -0,0 +1,23 @@
|
|||
FROM centos:7
|
||||
|
||||
ARG PACKAGENAME
|
||||
ARG PACKAGELOCATION
|
||||
ARG PREVIEWSUFFIX=
|
||||
ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module
|
||||
ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git"
|
||||
|
||||
# Install dependencies
|
||||
RUN yum install -y \
|
||||
curl \
|
||||
glibc-locale-source \
|
||||
git
|
||||
|
||||
# Setup the locale
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LC_ALL $LANG
|
||||
RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG
|
||||
|
||||
RUN curl -L -o $PACKAGENAME $PACKAGELOCATION/$PACKAGENAME \
|
||||
&& yum install -y $PACKAGENAME
|
||||
RUN $TESTDOWNLOADCOMMAND
|
||||
RUN pwsh$PREVIEWSUFFIX -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount"
|
29
docker/tests/Templates/debian.9/Dockerfile
Normal file
29
docker/tests/Templates/debian.9/Dockerfile
Normal file
|
@ -0,0 +1,29 @@
|
|||
FROM debian:stretch
|
||||
|
||||
ARG PACKAGENAME
|
||||
ARG PACKAGELOCATION
|
||||
ARG PREVIEWSUFFIX=
|
||||
ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module
|
||||
ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git"
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
apt-utils \
|
||||
ca-certificates \
|
||||
curl \
|
||||
apt-transport-https \
|
||||
locales \
|
||||
git \
|
||||
&& apt-get clean
|
||||
|
||||
# Setup the locale
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LC_ALL $LANG
|
||||
RUN locale-gen $LANG && update-locale
|
||||
|
||||
RUN curl -L -o $PACKAGENAME $PACKAGELOCATION/$PACKAGENAME
|
||||
RUN dpkg -i $PACKAGENAME || :
|
||||
RUN apt-get install -y -f --no-install-recommends
|
||||
RUN $TESTDOWNLOADCOMMAND
|
||||
RUN pwsh$PREVIEWSUFFIX -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount"
|
26
docker/tests/Templates/fedora28/Dockerfile
Normal file
26
docker/tests/Templates/fedora28/Dockerfile
Normal file
|
@ -0,0 +1,26 @@
|
|||
FROM fedora:28
|
||||
|
||||
ARG PACKAGENAME
|
||||
ARG PACKAGELOCATION
|
||||
ARG PREVIEWSUFFIX=
|
||||
ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module
|
||||
ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git"
|
||||
|
||||
# Install dependencies
|
||||
RUN dnf install -y \
|
||||
curl \
|
||||
glibc-locale-source \
|
||||
git \
|
||||
compat-openssl10 \
|
||||
&& dnf upgrade-minimal -y --security \
|
||||
&& dnf clean all
|
||||
|
||||
# Setup the locale
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LC_ALL $LANG
|
||||
RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG
|
||||
|
||||
RUN curl -L -o $PACKAGENAME $PACKAGELOCATION/$PACKAGENAME
|
||||
RUN dnf install -y $PACKAGENAME
|
||||
RUN $TESTDOWNLOADCOMMAND
|
||||
RUN pwsh$PREVIEWSUFFIX -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount"
|
31
docker/tests/Templates/fxdependent-centos7/Dockerfile
Normal file
31
docker/tests/Templates/fxdependent-centos7/Dockerfile
Normal file
|
@ -0,0 +1,31 @@
|
|||
FROM centos:7
|
||||
|
||||
ARG PACKAGENAME
|
||||
ARG PACKAGELOCATION
|
||||
ARG PREVIEWSUFFIX=
|
||||
ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module
|
||||
ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git"
|
||||
|
||||
# Install dependencies
|
||||
RUN yum install -y \
|
||||
glibc-locale-source \
|
||||
git
|
||||
|
||||
# Install dotnet-runtime
|
||||
RUN rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm
|
||||
RUN yum install -y \
|
||||
dotnet-runtime-2.1
|
||||
|
||||
# Setup the locale
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LC_ALL $LANG
|
||||
RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG
|
||||
|
||||
# Install PowerShell package
|
||||
ADD $PACKAGELOCATION/$PACKAGENAME .
|
||||
RUN mkdir -p /opt/microsoft/powershell
|
||||
RUN tar zxf $PACKAGENAME -C /opt/microsoft/powershell
|
||||
|
||||
# Download and run tests
|
||||
RUN $TESTDOWNLOADCOMMAND
|
||||
RUN dotnet /opt/microsoft/powershell/pwsh.dll -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount"
|
31
docker/tests/Templates/fxdependent-debian.9/Dockerfile
Normal file
31
docker/tests/Templates/fxdependent-debian.9/Dockerfile
Normal file
|
@ -0,0 +1,31 @@
|
|||
FROM microsoft/dotnet:2.1.7-runtime-stretch-slim
|
||||
|
||||
ARG PACKAGENAME
|
||||
ARG PACKAGELOCATION
|
||||
ARG PREVIEWSUFFIX=
|
||||
ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module
|
||||
ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git"
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
apt-utils \
|
||||
ca-certificates \
|
||||
apt-transport-https \
|
||||
locales \
|
||||
git \
|
||||
&& apt-get clean
|
||||
|
||||
# Setup the locale
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LC_ALL $LANG
|
||||
RUN locale-gen $LANG && update-locale
|
||||
|
||||
# Install PowerShell package
|
||||
ADD $PACKAGELOCATION/$PACKAGENAME .
|
||||
RUN mkdir -p /opt/microsoft/powershell
|
||||
RUN tar zxf $PACKAGENAME -C /opt/microsoft/powershell
|
||||
|
||||
# Download and run tests
|
||||
RUN $TESTDOWNLOADCOMMAND
|
||||
RUN dotnet /opt/microsoft/powershell/pwsh.dll -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount"
|
|
@ -0,0 +1,31 @@
|
|||
FROM microsoft/dotnet:3.0.100-preview-sdk
|
||||
|
||||
ARG PACKAGENAME
|
||||
ARG PACKAGELOCATION
|
||||
ARG PREVIEWSUFFIX=
|
||||
ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module
|
||||
ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git"
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
apt-utils \
|
||||
ca-certificates \
|
||||
apt-transport-https \
|
||||
locales \
|
||||
git \
|
||||
&& apt-get clean
|
||||
|
||||
# Setup the locale
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LC_ALL $LANG
|
||||
RUN locale-gen $LANG && update-locale
|
||||
|
||||
# Install PowerShell package
|
||||
ADD $PACKAGELOCATION/$PACKAGENAME .
|
||||
RUN mkdir -p /opt/microsoft/powershell \
|
||||
&& tar zxf $PACKAGENAME -C /opt/microsoft/powershell
|
||||
|
||||
# Download and run tests
|
||||
RUN $TESTDOWNLOADCOMMAND
|
||||
RUN dotnet /opt/microsoft/powershell/pwsh.dll -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount"
|
38
docker/tests/Templates/fxdependent-fedora28/Dockerfile
Normal file
38
docker/tests/Templates/fxdependent-fedora28/Dockerfile
Normal file
|
@ -0,0 +1,38 @@
|
|||
FROM fedora:28
|
||||
|
||||
ARG PACKAGENAME
|
||||
ARG PACKAGELOCATION
|
||||
ARG PREVIEWSUFFIX=
|
||||
ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module
|
||||
ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git"
|
||||
|
||||
# Install dependencies
|
||||
RUN dnf install -y \
|
||||
glibc-locale-source \
|
||||
git \
|
||||
compat-openssl10 \
|
||||
&& dnf upgrade-minimal -y --security \
|
||||
&& dnf clean all
|
||||
|
||||
# Install dotnet-runtime
|
||||
RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc
|
||||
ADD https://packages.microsoft.com/config/fedora/27/prod.repo .
|
||||
RUN mv prod.repo /etc/yum.repos.d/microsoft-prod.repo
|
||||
RUN dnf install -y \
|
||||
dotnet-runtime-2.1 \
|
||||
&& dnf upgrade-minimal -y --security \
|
||||
&& dnf clean all
|
||||
|
||||
# Setup the locale
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LC_ALL $LANG
|
||||
RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG
|
||||
|
||||
# Install PowerShell package
|
||||
ADD $PACKAGELOCATION/$PACKAGENAME .
|
||||
RUN mkdir -p /opt/microsoft/powershell \
|
||||
&& tar zxf $PACKAGENAME -C /opt/microsoft/powershell
|
||||
|
||||
# Download and run tests
|
||||
RUN $TESTDOWNLOADCOMMAND
|
||||
RUN dotnet /opt/microsoft/powershell/pwsh.dll -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount"
|
41
docker/tests/Templates/fxdependent-opensuse42.3/Dockerfile
Normal file
41
docker/tests/Templates/fxdependent-opensuse42.3/Dockerfile
Normal file
|
@ -0,0 +1,41 @@
|
|||
FROM opensuse:42.3
|
||||
|
||||
ARG PACKAGENAME
|
||||
ARG PACKAGELOCATION
|
||||
ARG PREVIEWSUFFIX=
|
||||
ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module
|
||||
ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git"
|
||||
|
||||
# Install dependencies
|
||||
RUN zypper --non-interactive update --skip-interactive \
|
||||
&& zypper --non-interactive install \
|
||||
glibc-locale \
|
||||
glibc-i18ndata \
|
||||
tar \
|
||||
libunwind \
|
||||
libicu \
|
||||
openssl \
|
||||
git
|
||||
|
||||
# Install dotnet-runtime
|
||||
ADD https://packages.microsoft.com/keys/microsoft.asc .
|
||||
RUN rpmkeys --import microsoft.asc
|
||||
ADD https://packages.microsoft.com/config/opensuse/42.2/prod.repo .
|
||||
RUN mv prod.repo /etc/zypp/repos.d/microsoft-prod.repo
|
||||
RUN zypper --non-interactive update --skip-interactive \
|
||||
&& zypper --non-interactive install \
|
||||
dotnet-runtime-2.1
|
||||
|
||||
# Setup the locale
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LC_ALL $LANG
|
||||
RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG
|
||||
|
||||
# Install PowerShell package
|
||||
ADD $PACKAGELOCATION/$PACKAGENAME .
|
||||
RUN mkdir -p /opt/microsoft/powershell
|
||||
RUN tar zxf $PACKAGENAME -C /opt/microsoft/powershell
|
||||
|
||||
# Download and run tests
|
||||
RUN $TESTDOWNLOADCOMMAND
|
||||
RUN dotnet /opt/microsoft/powershell/pwsh.dll -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount"
|
39
docker/tests/Templates/fxdependent-ubuntu16.04/Dockerfile
Normal file
39
docker/tests/Templates/fxdependent-ubuntu16.04/Dockerfile
Normal file
|
@ -0,0 +1,39 @@
|
|||
FROM ubuntu:xenial
|
||||
|
||||
ARG PACKAGENAME
|
||||
ARG PACKAGELOCATION
|
||||
ARG PREVIEWSUFFIX=
|
||||
ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module
|
||||
ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git"
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
apt-utils \
|
||||
ca-certificates \
|
||||
apt-transport-https \
|
||||
locales \
|
||||
git \
|
||||
&& apt-get clean
|
||||
|
||||
# Install dotnet-runtime
|
||||
ADD https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb .
|
||||
RUN dpkg -i packages-microsoft-prod.deb
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
dotnet-runtime-2.1 \
|
||||
&& apt-get clean
|
||||
|
||||
# Setup the locale
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LC_ALL $LANG
|
||||
RUN locale-gen $LANG && update-locale
|
||||
|
||||
# Install PowerShell package
|
||||
ADD $PACKAGELOCATION/$PACKAGENAME .
|
||||
RUN mkdir -p /opt/microsoft/powershell \
|
||||
&& tar zxf $PACKAGENAME -C /opt/microsoft/powershell
|
||||
|
||||
# Download and run tests
|
||||
RUN $TESTDOWNLOADCOMMAND
|
||||
RUN dotnet /opt/microsoft/powershell/pwsh.dll -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount"
|
31
docker/tests/Templates/fxdependent-ubuntu18.04/Dockerfile
Normal file
31
docker/tests/Templates/fxdependent-ubuntu18.04/Dockerfile
Normal file
|
@ -0,0 +1,31 @@
|
|||
FROM microsoft/dotnet:2.1.7-runtime-bionic
|
||||
|
||||
ARG PACKAGENAME
|
||||
ARG PACKAGELOCATION
|
||||
ARG PREVIEWSUFFIX=
|
||||
ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module
|
||||
ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git"
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
apt-utils \
|
||||
ca-certificates \
|
||||
apt-transport-https \
|
||||
locales \
|
||||
git \
|
||||
&& apt-get clean
|
||||
|
||||
# Setup the locale
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LC_ALL $LANG
|
||||
RUN locale-gen $LANG && update-locale
|
||||
|
||||
# Install PowerShell package
|
||||
ADD $PACKAGELOCATION/$PACKAGENAME .
|
||||
RUN mkdir -p /opt/microsoft/powershell \
|
||||
&& tar zxf $PACKAGENAME -C /opt/microsoft/powershell
|
||||
|
||||
# Download and run tests
|
||||
RUN $TESTDOWNLOADCOMMAND
|
||||
RUN dotnet /opt/microsoft/powershell/pwsh.dll -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount"
|
39
docker/tests/Templates/opensuse42.3/Dockerfile
Normal file
39
docker/tests/Templates/opensuse42.3/Dockerfile
Normal file
|
@ -0,0 +1,39 @@
|
|||
FROM opensuse:42.3
|
||||
|
||||
ARG PACKAGENAME
|
||||
ARG PACKAGELOCATION
|
||||
ARG PREVIEWSUFFIX=
|
||||
ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module
|
||||
ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git"
|
||||
|
||||
ARG POWERSHELL_LINKFILE=/usr/bin/pwsh
|
||||
|
||||
# Install dependencies
|
||||
RUN zypper --non-interactive update --skip-interactive \
|
||||
&& zypper --non-interactive install \
|
||||
glibc-locale \
|
||||
glibc-i18ndata \
|
||||
tar \
|
||||
curl \
|
||||
libunwind \
|
||||
libicu \
|
||||
openssl \
|
||||
git
|
||||
|
||||
# Setup the locale
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LC_ALL $LANG
|
||||
RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG
|
||||
|
||||
RUN curl -L -o $PACKAGENAME $PACKAGELOCATION/$PACKAGENAME
|
||||
|
||||
# Create the target folder where powershell will be placed
|
||||
RUN mkdir -p /opt/microsoft/powershell
|
||||
# Expand powershell to the target folder
|
||||
RUN tar zxf $PACKAGENAME -C /opt/microsoft/powershell
|
||||
|
||||
# Create the symbolic link that points to powershell
|
||||
RUN ln -s /opt/microsoft/powershell/pwsh $POWERSHELL_LINKFILE
|
||||
|
||||
RUN $TESTDOWNLOADCOMMAND
|
||||
RUN pwsh -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount"
|
29
docker/tests/Templates/ubuntu16.04/Dockerfile
Normal file
29
docker/tests/Templates/ubuntu16.04/Dockerfile
Normal file
|
@ -0,0 +1,29 @@
|
|||
FROM ubuntu:xenial
|
||||
|
||||
ARG PACKAGENAME
|
||||
ARG PACKAGELOCATION
|
||||
ARG PREVIEWSUFFIX=
|
||||
ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module
|
||||
ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git"
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
apt-utils \
|
||||
ca-certificates \
|
||||
curl \
|
||||
apt-transport-https \
|
||||
locales \
|
||||
git \
|
||||
&& apt-get clean
|
||||
|
||||
# Setup the locale
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LC_ALL $LANG
|
||||
RUN locale-gen $LANG && update-locale
|
||||
|
||||
RUN curl -L -o $PACKAGENAME $PACKAGELOCATION/$PACKAGENAME
|
||||
RUN dpkg -i $PACKAGENAME || :
|
||||
RUN apt-get install -y -f --no-install-recommends
|
||||
RUN $TESTDOWNLOADCOMMAND
|
||||
RUN pwsh$PREVIEWSUFFIX -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount"
|
29
docker/tests/Templates/ubuntu18.04/Dockerfile
Normal file
29
docker/tests/Templates/ubuntu18.04/Dockerfile
Normal file
|
@ -0,0 +1,29 @@
|
|||
FROM ubuntu:bionic
|
||||
|
||||
ARG PACKAGENAME
|
||||
ARG PACKAGELOCATION
|
||||
ARG PREVIEWSUFFIX=
|
||||
ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module
|
||||
ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git"
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
apt-utils \
|
||||
ca-certificates \
|
||||
curl \
|
||||
apt-transport-https \
|
||||
locales \
|
||||
git \
|
||||
&& apt-get clean
|
||||
|
||||
# Setup the locale
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LC_ALL $LANG
|
||||
RUN locale-gen $LANG && update-locale
|
||||
|
||||
RUN curl -L -o $PACKAGENAME $PACKAGELOCATION/$PACKAGENAME
|
||||
RUN dpkg -i $PACKAGENAME || :
|
||||
RUN apt-get install -y -f --no-install-recommends
|
||||
RUN $TESTDOWNLOADCOMMAND
|
||||
RUN pwsh$PREVIEWSUFFIX -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount"
|
370
docker/tests/containerTestCommon.psm1
Normal file
370
docker/tests/containerTestCommon.psm1
Normal file
|
@ -0,0 +1,370 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
$script:forcePull = $true
|
||||
# Get docker Engine OS
|
||||
function Get-DockerEngineOs
|
||||
{
|
||||
docker info --format '{{ .OperatingSystem }}'
|
||||
}
|
||||
|
||||
# Call Docker with appropriate result checksfunction Invoke-Docker
|
||||
function Invoke-Docker
|
||||
{
|
||||
param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string[]]
|
||||
$Command,
|
||||
[ValidateSet("error","warning",'ignore')]
|
||||
$FailureAction = 'error',
|
||||
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string[]]
|
||||
$Params,
|
||||
|
||||
[switch]
|
||||
$PassThru,
|
||||
[switch]
|
||||
$SuppressHostOutput
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Continue'
|
||||
|
||||
# Log how we are running docker for troubleshooting issues
|
||||
Write-Verbose "Running docker $command $params" -Verbose
|
||||
if($SuppressHostOutput.IsPresent)
|
||||
{
|
||||
$result = docker $command $params 2>&1
|
||||
}
|
||||
else
|
||||
{
|
||||
&'docker' $command $params 2>&1 | Tee-Object -Variable result -ErrorAction SilentlyContinue | Out-String -Stream -ErrorAction SilentlyContinue | Write-Host -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
$dockerExitCode = $LASTEXITCODE
|
||||
if($PassThru.IsPresent)
|
||||
{
|
||||
Write-Verbose "passing through docker result$($result.length)..." -Verbose
|
||||
return $result
|
||||
}
|
||||
elseif($dockerExitCode -ne 0 -and $FailureAction -eq 'error')
|
||||
{
|
||||
Write-Error "docker $command failed with: $result" -ErrorAction Stop
|
||||
return $false
|
||||
}
|
||||
elseif($dockerExitCode -ne 0 -and $FailureAction -eq 'warning')
|
||||
{
|
||||
Write-Warning "docker $command failed with: $result"
|
||||
return $false
|
||||
}
|
||||
elseif($dockerExitCode -ne 0)
|
||||
{
|
||||
return $false
|
||||
}
|
||||
|
||||
return $true
|
||||
}
|
||||
|
||||
# Return a list of Linux Container Test Cases
|
||||
function Get-LinuxContainer
|
||||
{
|
||||
foreach($os in 'centos7','ubuntu16.04')
|
||||
{
|
||||
Write-Output @{
|
||||
Name = $os
|
||||
Path = "$PSScriptRoot/../release/$os"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Return a list of Windows Container Test Cases
|
||||
function Get-WindowsContainer
|
||||
{
|
||||
foreach($os in 'windowsservercore','nanoserver')
|
||||
{
|
||||
Write-Output @{
|
||||
Name = $os
|
||||
Path = "$PSScriptRoot/../release/$os"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$script:repoName = 'microsoft/powershell'
|
||||
function Get-RepoName
|
||||
{
|
||||
return $script:repoName
|
||||
}
|
||||
|
||||
function Set-RepoName
|
||||
{
|
||||
param([string]$RepoName)
|
||||
|
||||
$script:repoName = $RepoName
|
||||
$script:forcePull = $false
|
||||
}
|
||||
|
||||
function Test-SkipWindows
|
||||
{
|
||||
[bool] $canRunWindows = (Get-DockerEngineOs) -like 'Windows*'
|
||||
return ($IsLinux -or $IsMacOS -or !$canRunWindows)
|
||||
}
|
||||
|
||||
function Test-SkipLinux
|
||||
{
|
||||
$os = Get-DockerEngineOs
|
||||
|
||||
switch -wildcard ($os)
|
||||
{
|
||||
'*Linux*' {
|
||||
return $false
|
||||
}
|
||||
'*Mac' {
|
||||
return $false
|
||||
}
|
||||
# Docker for Windows means we are running the linux kernel
|
||||
'Docker for Windows' {
|
||||
return $false
|
||||
}
|
||||
'Windows*' {
|
||||
return $true
|
||||
}
|
||||
default {
|
||||
throw "Unknown docker os '$os'"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Get-TestContext
|
||||
{
|
||||
param(
|
||||
[ValidateSet('Linux','Windows','macOS')]
|
||||
[string]$Type
|
||||
)
|
||||
|
||||
$resultFileName = 'results.xml'
|
||||
$logFileName = 'results.log'
|
||||
$containerTestDrive = '/test'
|
||||
|
||||
# Return a windows context if the Context in Windows *AND*
|
||||
# the current system is windows, otherwise Join-path will fail.
|
||||
if($Type -eq 'Windows' -and $IsWindows)
|
||||
{
|
||||
$ContainerTestDrive = 'C:\test'
|
||||
}
|
||||
$resolvedTestDrive = (Resolve-Path "Testdrive:\").providerPath
|
||||
|
||||
return @{
|
||||
ResolvedTestDrive = $resolvedTestDrive
|
||||
ResolvedXmlPath = Join-Path $resolvedTestDrive -ChildPath $resultFileName
|
||||
ResolvedLogPath = Join-Path $resolvedTestDrive -ChildPath $logFileName
|
||||
ContainerTestDrive = $ContainerTestDrive
|
||||
ContainerXmlPath = Join-Path $containerTestDrive -ChildPath $resultFileName
|
||||
ContainerLogPath = Join-Path $containerTestDrive -ChildPath $logFileName
|
||||
Type = $Type
|
||||
ForcePull = $script:forcePull
|
||||
}
|
||||
}
|
||||
|
||||
function Get-ContainerPowerShellVersion
|
||||
{
|
||||
param(
|
||||
[HashTable] $TestContext,
|
||||
[string] $RepoName,
|
||||
[string] $Name
|
||||
)
|
||||
|
||||
$imageTag = "${script:repoName}:${Name}"
|
||||
|
||||
if($TestContext.ForcePull)
|
||||
{
|
||||
$null=Invoke-Docker -Command 'image', 'pull' -Params $imageTag -SuppressHostOutput
|
||||
}
|
||||
|
||||
$runParams = @()
|
||||
$localVolumeName = $testContext.resolvedTestDrive
|
||||
$runParams += '--rm'
|
||||
if($TestContext.Type -ne 'Windows' -and $IsWindows)
|
||||
{
|
||||
# use a container volume on windows because host volumes are not automatic
|
||||
$volumeName = "test-volume-" + (Get-Random -Minimum 100 -Maximum 999)
|
||||
|
||||
# using alpine because it's tiny
|
||||
$null=Invoke-Docker -Command create -Params '-v', '/test', '--name', $volumeName, 'alpine' -SuppressHostOutput
|
||||
$runParams += '--volumes-from'
|
||||
$runParams += $volumeName
|
||||
}
|
||||
else {
|
||||
$runParams += '-v'
|
||||
$runParams += "${localVolumeName}:$($testContext.containerTestDrive)"
|
||||
}
|
||||
|
||||
$runParams += $imageTag
|
||||
$runParams += 'pwsh'
|
||||
$runParams += '-c'
|
||||
$runParams += ('$PSVersionTable.PSVersion.ToString() | out-string | out-file -encoding ascii -FilePath '+$testContext.containerLogPath)
|
||||
|
||||
$null = Invoke-Docker -Command run -Params $runParams -SuppressHostOutput
|
||||
if($TestContext.Type -ne 'Windows' -and $IsWindows)
|
||||
{
|
||||
$null = Invoke-Docker -Command cp -Params "${volumeName}:$($testContext.containerLogPath)", $TestContext.ResolvedLogPath
|
||||
$null = Invoke-Docker -Command container, rm -Params $volumeName, '--force' -SuppressHostOutput
|
||||
}
|
||||
return (Get-Content -Encoding Ascii $testContext.resolvedLogPath)[0]
|
||||
}
|
||||
|
||||
# Function defines a config mapping for testing Preview packages.
|
||||
# The list of supported OS for each release can be found here:
|
||||
# https://github.com/PowerShell/PowerShell-Docs/blob/staging/reference/docs-conceptual/PowerShell-Core-Support.md#supported-platforms
|
||||
function Get-DefaultPreviewConfigForPackageValidation
|
||||
{
|
||||
# format: <DockerfileFolderName>=<PartOfPackageFilename>
|
||||
@{ 'centos7'='rhel.7';
|
||||
'debian.9'='debian.9';
|
||||
'fedora28'='rhel.7';
|
||||
'opensuse42.3'='linux-x64.tar.gz';
|
||||
'ubuntu16.04'='ubuntu.16.04';
|
||||
'ubuntu18.04'='ubuntu.18.04';
|
||||
'fxdependent-centos7'='linux-x64-fxdependent.tar.gz';
|
||||
'fxdependent-debian.9'='linux-x64-fxdependent.tar.gz';
|
||||
'fxdependent-fedora28'='linux-x64-fxdependent.tar.gz';
|
||||
'fxdependent-opensuse42.3'='linux-x64-fxdependent.tar.gz';
|
||||
'fxdependent-ubuntu16.04'='linux-x64-fxdependent.tar.gz';
|
||||
'fxdependent-ubuntu18.04'='linux-x64-fxdependent.tar.gz';
|
||||
'fxdependent-dotnetsdk-latest'='linux-x64-fxd-dotnetsdk.tar.gz'
|
||||
}
|
||||
}
|
||||
|
||||
# Function defines a config mapping for testing Stable packages.
|
||||
# The list of supported OS for each release can be found here:
|
||||
# https://github.com/PowerShell/PowerShell-Docs/blob/staging/reference/docs-conceptual/PowerShell-Core-Support.md#supported-platforms
|
||||
function Get-DefaultStableConfigForPackageValidation
|
||||
{
|
||||
# format: <DockerfileFolderName>=<PartOfPackageFilename>
|
||||
@{ 'centos7'='rhel.7';
|
||||
'debian.9'='debian.9';
|
||||
'opensuse42.3'='linux-x64.tar.gz';
|
||||
'ubuntu16.04'='ubuntu.16.04';
|
||||
'fxdependent-centos7'='linux-x64-fxdependent.tar.gz';
|
||||
'fxdependent-debian.9'='linux-x64-fxdependent.tar.gz';
|
||||
'fxdependent-opensuse42.3'='linux-x64-fxdependent.tar.gz';
|
||||
'fxdependent-ubuntu16.04'='linux-x64-fxdependent.tar.gz'
|
||||
}
|
||||
}
|
||||
|
||||
# Returns a list of files in a specified Azure container.
|
||||
function Get-PackageNamesOnAzureBlob
|
||||
{
|
||||
param(
|
||||
[string]
|
||||
$ContainerUrl,
|
||||
|
||||
# $SAS (shared access signature) param should include beginning '?' and trailing '&'
|
||||
[string]
|
||||
$SAS
|
||||
)
|
||||
|
||||
|
||||
$response = Invoke-RestMethod -Method Get -Uri $($ContainerUrl + $SAS + 'restype=container&comp=list')
|
||||
|
||||
$xmlResponce = [xml]$response.Substring($response.IndexOf('<EnumerationResults')) # remove some bad chars in the beginning that break XML parsing
|
||||
($xmlResponce.EnumerationResults.Blobs.Blob).Name
|
||||
}
|
||||
|
||||
# This function is used for basic validation of PS packages during a release;
|
||||
# During the process Docker files are filled out and executed with Docker build;
|
||||
# During the build PS packages are downloaded onto Docker containers, installed and selected Pester tests from PowerShell Github repo are executed.
|
||||
# This function must be run on a Docker host machine in 'Linux containers' mode, such as Windows 10 server with Hyper-V role installed.
|
||||
function Test-PSPackage
|
||||
{
|
||||
param(
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$PSPackageLocation, # e.g. Azure container storage url
|
||||
[string]
|
||||
$SAS,# $SAS (shared access signature) param should include beginning '?' and trailing '&'
|
||||
[Hashtable]
|
||||
$Config, # hashtable that maps packages to dockerfiles; for example see Get-DefaultConfigForPackageValidation
|
||||
[string]
|
||||
$TestList = "/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module",
|
||||
[string]
|
||||
$TestDownloadCommand = "git clone --recursive https://github.com/PowerShell/PowerShell.git",
|
||||
[switch]
|
||||
$Preview = $false
|
||||
)
|
||||
|
||||
$PSPackageLocation = $PSPackageLocation.TrimEnd('/','\') # code below assumes there is no trailing separator in PSPackageLocation url
|
||||
$RootFolder = Join-Path $PSScriptRoot 'Templates'
|
||||
|
||||
|
||||
$packageList = Get-PackageNamesOnAzureBlob -ContainerUrl $PSPackageLocation -SAS $SAS
|
||||
if (!$Config)
|
||||
{
|
||||
if ($Preview)
|
||||
{
|
||||
$Config = Get-DefaultPreviewConfigForPackageValidation
|
||||
}
|
||||
else
|
||||
{
|
||||
$Config = Get-DefaultStableConfigForPackageValidation
|
||||
}
|
||||
}
|
||||
|
||||
# pre-process $Config: verify build directories and packages exist
|
||||
$map = @{}
|
||||
foreach($kp in $Config.GetEnumerator())
|
||||
{
|
||||
$buildDir = Join-Path $RootFolder $kp.Key
|
||||
$packageName = $packageList | Where-Object {$_ -like $('*'+$kp.Value+'*')}
|
||||
|
||||
if (-not (Test-Path $buildDir))
|
||||
{
|
||||
Write-Error "Directory does Not exist - $buildDir; Check `$Config parameter and '$RootFolder' folder"
|
||||
}
|
||||
elseif (-not ($packageName))
|
||||
{
|
||||
Write-Error "Can not find package that matches filter *$($kp.Value)*; Check `$Config parameter and '$PSPackageLocation'"
|
||||
}
|
||||
else
|
||||
{
|
||||
$map.Add($buildDir, $packageName)
|
||||
}
|
||||
}
|
||||
|
||||
Write-Verbose "Using configuration:" -Verbose
|
||||
Write-Verbose ($map | Format-List | Out-String) -Verbose
|
||||
|
||||
$results = @{}
|
||||
$returnValue = $true
|
||||
|
||||
# run builds sequentially, but don't block for errors so that configs after failed one can run
|
||||
foreach($kp in $map.GetEnumerator())
|
||||
{
|
||||
$dockerDirPath = $kp.Key
|
||||
$packageFileName = $kp.Value
|
||||
|
||||
$buildArgs = @()
|
||||
|
||||
$buildArgs += "--build-arg","PACKAGENAME=$packageFileName"
|
||||
$buildArgs += "--build-arg","PACKAGELOCATION=$PSPackageLocation"
|
||||
if ($Preview)
|
||||
{
|
||||
$buildArgs += "--build-arg","PREVIEWSUFFIX=-preview"
|
||||
}
|
||||
$buildArgs += "--build-arg","TESTLIST=$TestList"
|
||||
$buildArgs += "--build-arg","TESTDOWNLOADCOMMAND=$TestDownloadCommand"
|
||||
$buildArgs += "--no-cache"
|
||||
$buildArgs += $dockerDirPath
|
||||
|
||||
$dockerResult = Invoke-Docker -Command 'build' -Params $buildArgs -FailureAction warning
|
||||
|
||||
$confName = Split-Path -Leaf $dockerDirPath
|
||||
$results.Add($confName, $dockerResult)
|
||||
if (-not $dockerResult) {$returnValue = $false}
|
||||
}
|
||||
|
||||
# in the end print results for all configurations
|
||||
Write-Verbose "Package validation results:" -Verbose
|
||||
$results
|
||||
|
||||
return $returnValue
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"sdk": {
|
||||
"version": "6.0.100"
|
||||
"version": "6.0.100-rc.1.21464.4"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
<configuration>
|
||||
<packageSources>
|
||||
<clear />
|
||||
<add key="dotnet" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v2" />
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||
<add key="dotnet-internal" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/6.0.100-rc.1.21430.44-shipping/nuget/v2" />
|
||||
</packageSources>
|
||||
<disabledPackageSources>
|
||||
<clear />
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
|
||||
<PackageReference Include="System.ServiceProcess.ServiceController" Version="6.0.0" />
|
||||
<PackageReference Include="System.ServiceProcess.ServiceController" Version="6.0.0-rc.2.21480.5" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\System.Management.Automation\System.Management.Automation.csproj" />
|
||||
<PackageReference Include="Microsoft.PowerShell.MarkdownRender" Version="7.2.0" />
|
||||
<PackageReference Include="Microsoft.PowerShell.MarkdownRender" Version="7.2.0-preview.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
@ -31,9 +31,9 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.0-6.final" />
|
||||
<PackageReference Include="System.Threading.AccessControl" Version="6.0.0" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.0-5.final" />
|
||||
<PackageReference Include="System.Threading.AccessControl" Version="6.0.0-rc.2.21480.5" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="6.0.0-rc.2.21480.5" />
|
||||
<PackageReference Include="NJsonSchema" Version="10.5.2" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
|
||||
if (s_inputFieldRegex == null)
|
||||
{
|
||||
s_inputFieldRegex = new Regex(@"<input\s+[^>]*(/?>|>.*?</input>)",
|
||||
s_inputFieldRegex = new Regex(@"<input\s+[^>]*(/>|>.*?</input>)",
|
||||
RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Management.Automation;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
/// <summary>
|
||||
/// A completer for HTTP version names.
|
||||
/// </summary>
|
||||
internal sealed class HttpVersionCompletionsAttribute : ArgumentCompletionsAttribute
|
||||
{
|
||||
public static readonly string[] AllowedVersions;
|
||||
|
||||
static HttpVersionCompletionsAttribute()
|
||||
{
|
||||
FieldInfo[] fields = typeof(HttpVersion).GetFields(BindingFlags.Static | BindingFlags.Public);
|
||||
|
||||
var versions = new List<string>(fields.Length - 1);
|
||||
|
||||
for (int i = 0; i < fields.Length; i++)
|
||||
{
|
||||
// skip field Unknown and not Version type
|
||||
if (fields[i].Name == nameof(HttpVersion.Unknown) || fields[i].FieldType != typeof(Version))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var version = (Version?)fields[i].GetValue(null);
|
||||
|
||||
if (version is not null)
|
||||
{
|
||||
versions.Add(version.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
AllowedVersions = versions.ToArray();
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public HttpVersionCompletionsAttribute() : base(AllowedVersions)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
|
@ -107,18 +107,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
|
||||
#endregion
|
||||
|
||||
#region HTTP Version
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the HTTP Version property.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
[ArgumentToVersionTransformation]
|
||||
[HttpVersionCompletions]
|
||||
public virtual Version HttpVersion { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Session
|
||||
/// <summary>
|
||||
/// Gets or sets the Session property.
|
||||
|
@ -1093,11 +1081,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
// create the base WebRequest object
|
||||
var request = new HttpRequestMessage(httpMethod, requestUri);
|
||||
|
||||
if (HttpVersion is not null)
|
||||
{
|
||||
request.Version = HttpVersion;
|
||||
}
|
||||
|
||||
// pull in session data
|
||||
if (WebSession.Headers.Count > 0)
|
||||
{
|
||||
|
@ -1430,7 +1413,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
string reqVerboseMsg = string.Format(
|
||||
CultureInfo.CurrentCulture,
|
||||
WebCmdletStrings.WebMethodInvocationVerboseMsg,
|
||||
requestWithoutRange.Version,
|
||||
requestWithoutRange.Method,
|
||||
requestWithoutRange.RequestUri,
|
||||
requestContentLength);
|
||||
|
@ -1523,14 +1505,10 @@ namespace Microsoft.PowerShell.Commands
|
|||
if (request.Content != null)
|
||||
requestContentLength = request.Content.Headers.ContentLength.Value;
|
||||
|
||||
string reqVerboseMsg = string.Format(
|
||||
CultureInfo.CurrentCulture,
|
||||
string reqVerboseMsg = string.Format(CultureInfo.CurrentCulture,
|
||||
WebCmdletStrings.WebMethodInvocationVerboseMsg,
|
||||
request.Version,
|
||||
request.Method,
|
||||
request.RequestUri,
|
||||
requestContentLength);
|
||||
|
||||
WriteVerbose(reqVerboseMsg);
|
||||
|
||||
HttpResponseMessage response = GetResponse(client, request, keepAuthorization);
|
||||
|
|
|
@ -27,13 +27,15 @@ namespace Microsoft.PowerShell.Commands
|
|||
|
||||
private int _depth = 2;
|
||||
|
||||
private const int maxDepthAllowed = 100;
|
||||
|
||||
private readonly CancellationTokenSource _cancellationSource = new();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Depth property.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
[ValidateRange(0, 100)]
|
||||
[ValidateRange(0, int.MaxValue)]
|
||||
public int Depth
|
||||
{
|
||||
get { return _depth; }
|
||||
|
@ -97,7 +99,23 @@ namespace Microsoft.PowerShell.Commands
|
|||
_cancellationSource.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Prerequisite checks.
|
||||
/// </summary>
|
||||
protected override void BeginProcessing()
|
||||
{
|
||||
if (_depth > maxDepthAllowed)
|
||||
{
|
||||
string errorMessage = StringUtil.Format(WebCmdletStrings.ReachedMaximumDepthAllowed, maxDepthAllowed);
|
||||
ThrowTerminatingError(new ErrorRecord(
|
||||
new InvalidOperationException(errorMessage),
|
||||
"ReachedMaximumDepthAllowed",
|
||||
ErrorCategory.InvalidOperation,
|
||||
null));
|
||||
}
|
||||
}
|
||||
|
||||
private readonly List<object> _inputObjects = new();
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
<data name="AuthenticationCredentialNotSupplied" xml:space="preserve">
|
||||
<value>The cmdlet cannot run because the following parameter is not specified: Credential. The supplied Authentication type requires a Credential. Specify Credential, then retry.</value>
|
||||
</data>
|
||||
<data name="AuthenticationTokenNotSupplied" xml:space="preserve">
|
||||
<data name="AuthenticationTokenNotSupplied" xml:space="preserve">
|
||||
<value>The cmdlet cannot run because the following parameter is not specified: Token. The supplied Authentication type requires a Token. Specify Token, then retry.</value>
|
||||
</data>
|
||||
<data name="AuthenticationTokenConflict" xml:space="preserve">
|
||||
|
@ -237,6 +237,9 @@
|
|||
<data name="JsonNetModuleFilesRequired" xml:space="preserve">
|
||||
<value>Ensure 'Json.Net.psd1' and 'Newtonsoft.Json.dll' are available in a versioned subdirectory of '{0}'.</value>
|
||||
</data>
|
||||
<data name="ReachedMaximumDepthAllowed" xml:space="preserve">
|
||||
<value>The maximum depth allowed for serialization is {0}.</value>
|
||||
</data>
|
||||
<data name="JsonDeserializationFailed" xml:space="preserve">
|
||||
<value>Conversion from JSON failed with error: {0}</value>
|
||||
</data>
|
||||
|
@ -247,7 +250,7 @@
|
|||
<value>Following rel link {0}</value>
|
||||
</data>
|
||||
<data name="WebMethodInvocationVerboseMsg" xml:space="preserve">
|
||||
<value>HTTP/{0} {1} {2} with {3}-byte payload</value>
|
||||
<value>{0} with {1}-byte payload</value>
|
||||
</data>
|
||||
<data name="WebMethodResumeFailedVerboseMsg" xml:space="preserve">
|
||||
<value>The remote server indicated it could not resume downloading. The local file will be overwritten.</value>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
|
||||
<PackageReference Include="System.Diagnostics.EventLog" Version="6.0.0" />
|
||||
<PackageReference Include="System.Diagnostics.EventLog" Version="6.0.0-rc.2.21480.5" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
<AssemblyName>Microsoft.PowerShell.GlobalTool.Shim</AssemblyName>
|
||||
<OutputType>EXE</OutputType>
|
||||
<RootNamespace>Microsoft.PowerShell.GlobalTool.Shim</RootNamespace>
|
||||
<UseAppHost>False</UseAppHost>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" Condition="'$(SDKToUse)' == 'Microsoft.NET.Sdk' " />
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
<!-- the following package(s) are from https://github.com/dotnet/fxdac -->
|
||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.3" />
|
||||
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
|
||||
<PackageReference Include="System.IO.Packaging" Version="6.0.0" />
|
||||
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="6.0.0" />
|
||||
<PackageReference Include="System.Text.Encodings.Web" Version="6.0.0" />
|
||||
<PackageReference Include="System.IO.Packaging" Version="6.0.0-rc.2.21480.5" />
|
||||
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="6.0.0-rc.2.21480.5" />
|
||||
<PackageReference Include="System.Text.Encodings.Web" Version="6.0.0-rc.2.21480.5" />
|
||||
<!-- the following package(s) are from https://github.com/dotnet/wcf -->
|
||||
<PackageReference Include="System.ServiceModel.Duplex" Version="4.9.0" />
|
||||
<PackageReference Include="System.ServiceModel.Http" Version="4.9.0" />
|
||||
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.9.0" />
|
||||
<PackageReference Include="System.ServiceModel.Primitives" Version="4.9.0" />
|
||||
<PackageReference Include="System.ServiceModel.Security" Version="4.9.0" />
|
||||
<PackageReference Include="System.Private.ServiceModel" Version="4.9.0" />
|
||||
<PackageReference Include="System.ServiceModel.Duplex" Version="4.9.0-rc2.21473.1" />
|
||||
<PackageReference Include="System.ServiceModel.Http" Version="4.9.0-rc2.21473.1" />
|
||||
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.9.0-rc2.21473.1" />
|
||||
<PackageReference Include="System.ServiceModel.Primitives" Version="4.9.0-rc2.21473.1" />
|
||||
<PackageReference Include="System.ServiceModel.Security" Version="4.9.0-rc2.21473.1" />
|
||||
<PackageReference Include="System.Private.ServiceModel" Version="4.9.0-rc2.21473.1" />
|
||||
<!-- the source could not be found for the following package(s) -->
|
||||
<PackageReference Include="Microsoft.NETCore.Windows.ApiSets" Version="1.0.1" />
|
||||
<PackageReference Include="Microsoft.Windows.Compatibility" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Windows.Compatibility" Version="6.0.0-rc.2.21480.5" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<ProjectReference Include="..\System.Management.Automation\System.Management.Automation.csproj" />
|
||||
<ProjectReference Include="..\Microsoft.WSMan.Runtime\Microsoft.WSMan.Runtime.csproj" />
|
||||
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
|
||||
<PackageReference Include="System.ServiceProcess.ServiceController" Version="6.0.0" />
|
||||
<PackageReference Include="System.ServiceProcess.ServiceController" Version="6.0.0-rc.2.21480.5" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -184,7 +184,7 @@ namespace System.Management.Automation
|
|||
#endif
|
||||
|
||||
// format files
|
||||
internal static readonly string[] FormatFileNames = new string[]
|
||||
internal static readonly List<string> FormatFileNames = new()
|
||||
{
|
||||
"Certificate.format.ps1xml",
|
||||
"Diagnostics.format.ps1xml",
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace System.Management.Automation
|
|||
/// <summary>Classic rendering of progress.</summary>
|
||||
Classic = 1,
|
||||
}
|
||||
|
||||
|
||||
#region PSStyle
|
||||
/// <summary>
|
||||
/// Contains configuration for how PowerShell renders text.
|
||||
|
@ -365,7 +365,7 @@ namespace System.Management.Automation
|
|||
get => _error;
|
||||
set => _error = ValidateNoContent(value);
|
||||
}
|
||||
|
||||
|
||||
private string _error = "\x1b[31;1m";
|
||||
|
||||
/// <summary>
|
||||
|
@ -397,7 +397,7 @@ namespace System.Management.Automation
|
|||
{
|
||||
get => _debug;
|
||||
set => _debug = ValidateNoContent(value);
|
||||
}
|
||||
}
|
||||
|
||||
private string _debug = "\x1b[33;1m";
|
||||
}
|
||||
|
@ -467,16 +467,6 @@ namespace System.Management.Automation
|
|||
_extensionDictionary.Add(ValidateExtension(extension), ValidateNoContent(decoration));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add new extension and decoration to dictionary without validation.
|
||||
/// </summary>
|
||||
/// <param name="extension">Extension to add.</param>
|
||||
/// <param name="decoration">ANSI string value to add.</param>
|
||||
internal void AddWithoutValidation(string extension, string decoration)
|
||||
{
|
||||
_extensionDictionary.Add(extension, decoration);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove an extension from dictionary.
|
||||
/// </summary>
|
||||
|
@ -553,19 +543,19 @@ namespace System.Management.Automation
|
|||
Extension = new FileExtensionDictionary();
|
||||
|
||||
// archives
|
||||
Extension.AddWithoutValidation(".zip", "\x1b[31;1m");
|
||||
Extension.AddWithoutValidation(".tgz", "\x1b[31;1m");
|
||||
Extension.AddWithoutValidation(".gz", "\x1b[31;1m");
|
||||
Extension.AddWithoutValidation(".tar", "\x1b[31;1m");
|
||||
Extension.AddWithoutValidation(".nupkg", "\x1b[31;1m");
|
||||
Extension.AddWithoutValidation(".cab", "\x1b[31;1m");
|
||||
Extension.AddWithoutValidation(".7z", "\x1b[31;1m");
|
||||
Extension.Add(".zip", "\x1b[31;1m");
|
||||
Extension.Add(".tgz", "\x1b[31;1m");
|
||||
Extension.Add(".gz", "\x1b[31;1m");
|
||||
Extension.Add(".tar", "\x1b[31;1m");
|
||||
Extension.Add(".nupkg", "\x1b[31;1m");
|
||||
Extension.Add(".cab", "\x1b[31;1m");
|
||||
Extension.Add(".7z", "\x1b[31;1m");
|
||||
|
||||
// powershell
|
||||
Extension.AddWithoutValidation(".ps1", "\x1b[33;1m");
|
||||
Extension.AddWithoutValidation(".psd1", "\x1b[33;1m");
|
||||
Extension.AddWithoutValidation(".psm1", "\x1b[33;1m");
|
||||
Extension.AddWithoutValidation(".ps1xml", "\x1b[33;1m");
|
||||
Extension.Add(".ps1", "\x1b[33;1m");
|
||||
Extension.Add(".psd1", "\x1b[33;1m");
|
||||
Extension.Add(".psm1", "\x1b[33;1m");
|
||||
Extension.Add(".ps1xml", "\x1b[33;1m");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -698,7 +688,7 @@ namespace System.Management.Automation
|
|||
|
||||
private static string ValidateNoContent(string text)
|
||||
{
|
||||
var decorartedString = new ValueStringDecorated(text);
|
||||
var decorartedString = new StringDecorated(text);
|
||||
if (decorartedString.ContentLength > 0)
|
||||
{
|
||||
throw new ArgumentException(string.Format(PSStyleStrings.TextContainsContent, decorartedString.ToString(OutputRendering.PlainText)));
|
||||
|
|
|
@ -14,21 +14,21 @@
|
|||
<!-- the following package(s) are from https://github.com/JamesNK/Newtonsoft.Json -->
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<!-- the Application Insights package -->
|
||||
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.19.0" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.18.0" />
|
||||
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
|
||||
<PackageReference Include="Microsoft.Win32.Registry.AccessControl" Version="6.0.0" />
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0" />
|
||||
<PackageReference Include="System.DirectoryServices" Version="6.0.0" />
|
||||
<!--PackageReference Include="System.IO.FileSystem.AccessControl" Version="6.0.0-preview.5.21301.5" /-->
|
||||
<PackageReference Include="System.Management" Version="6.0.0" />
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
|
||||
<PackageReference Include="System.Security.AccessControl" Version="6.0.0" />
|
||||
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="6.0.0" />
|
||||
<PackageReference Include="System.Security.Permissions" Version="6.0.0" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Win32.Registry.AccessControl" Version="6.0.0-rc.2.21480.5" />
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0-rc.2.21480.5" />
|
||||
<PackageReference Include="System.DirectoryServices" Version="6.0.0-rc.2.21480.5" />
|
||||
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="6.0.0-preview.5.21301.5" />
|
||||
<PackageReference Include="System.Management" Version="6.0.0-rc.2.21480.5" />
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0-rc.2.21480.5" />
|
||||
<PackageReference Include="System.Security.AccessControl" Version="6.0.0-rc.2.21480.5" />
|
||||
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="6.0.0-rc.2.21480.5" />
|
||||
<PackageReference Include="System.Security.Permissions" Version="6.0.0-rc.2.21480.5" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0-rc.2.21480.5" />
|
||||
<!-- the following package(s) are from the powershell org -->
|
||||
<PackageReference Include="Microsoft.Management.Infrastructure" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.PowerShell.Native" Version="7.2.0" />
|
||||
<PackageReference Include="Microsoft.PowerShell.Native" Version="7.2.0-preview.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#nullable enable
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace System.Management.Automation
|
||||
{
|
||||
/// <summary>
|
||||
/// To make it easier to specify a version, we add some conversions that wouldn't happen otherwise:
|
||||
/// * A simple integer, i.e. 2;
|
||||
/// * A string without a dot, i.e. "2".
|
||||
/// </summary>
|
||||
internal class ArgumentToVersionTransformationAttribute : ArgumentTransformationAttribute
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public override object Transform(EngineIntrinsics engineIntrinsics, object inputData)
|
||||
{
|
||||
object version = PSObject.Base(inputData);
|
||||
|
||||
if (version is string versionStr)
|
||||
{
|
||||
if (TryConvertFromString(versionStr, out var convertedVersion))
|
||||
{
|
||||
return convertedVersion;
|
||||
}
|
||||
|
||||
if (versionStr.Contains('.'))
|
||||
{
|
||||
// If the string contains a '.', let the Version constructor handle the conversion.
|
||||
return inputData;
|
||||
}
|
||||
}
|
||||
|
||||
if (version is double)
|
||||
{
|
||||
// The conversion to int below is wrong, but the usual conversions will turn
|
||||
// the double into a string, so just return the original object.
|
||||
return inputData;
|
||||
}
|
||||
|
||||
if (LanguagePrimitives.TryConvertTo<int>(version, out var majorVersion))
|
||||
{
|
||||
return new Version(majorVersion, 0);
|
||||
}
|
||||
|
||||
return inputData;
|
||||
}
|
||||
|
||||
protected virtual bool TryConvertFromString(string versionString, [NotNullWhen(true)] out Version? version)
|
||||
{
|
||||
version = null;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1813,14 +1813,9 @@ namespace System.Management.Automation
|
|||
}
|
||||
}
|
||||
}
|
||||
if (completionContext.TokenAtCursor.TokenFlags == TokenFlags.MemberName)
|
||||
{
|
||||
result = GetResultForAttributeArgument(completionContext, ref replacementIndex, ref replacementLength);
|
||||
if (result is not null)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
result = GetResultForAttributeArgument(completionContext, ref replacementIndex, ref replacementLength);
|
||||
if (result != null) return result;
|
||||
|
||||
if ((tokenAtCursor.TokenFlags & TokenFlags.CommandName) != 0)
|
||||
{
|
||||
|
|
|
@ -23,7 +23,6 @@ namespace System.Management.Automation
|
|||
internal const string EngineSource = "PSEngine";
|
||||
internal const string PSNativeCommandArgumentPassingFeatureName = "PSNativeCommandArgumentPassing";
|
||||
internal const string PSNativeCommandErrorActionPreferenceFeatureName = "PSNativeCommandErrorActionPreference";
|
||||
internal const string PSRemotingSSHTransportErrorHandling = "PSRemotingSSHTransportErrorHandling";
|
||||
internal const string PSCleanBlockFeatureName = "PSCleanBlock";
|
||||
|
||||
#endregion
|
||||
|
@ -128,9 +127,6 @@ namespace System.Management.Automation
|
|||
new ExperimentalFeature(
|
||||
name: PSNativeCommandErrorActionPreferenceFeatureName,
|
||||
description: "Native commands with non-zero exit codes issue errors according to $ErrorActionPreference when $PSNativeCommandUseErrorActionPreference is $true"),
|
||||
new ExperimentalFeature(
|
||||
name: PSRemotingSSHTransportErrorHandling,
|
||||
description: "Removes the SSH remoting transport stdErr stream message handling as terminating errors, and instead just writes error messages to console."),
|
||||
new ExperimentalFeature(
|
||||
name: PSCleanBlockFeatureName,
|
||||
description: "Add support of a 'Clean' block to functions and script cmdlets for easy resource cleanup"),
|
||||
|
|
|
@ -1434,6 +1434,9 @@ namespace System.Management.Automation.Runspaces
|
|||
return iss;
|
||||
}
|
||||
|
||||
// Porting note: moved to Platform so we have one list to maintain
|
||||
private static readonly string[] s_PSCoreFormatFileNames = Platform.FormatFileNames.ToArray();
|
||||
|
||||
private static void IncludePowerShellCoreFormats(InitialSessionState iss)
|
||||
{
|
||||
string psHome = Utils.DefaultPowerShellAppBase;
|
||||
|
@ -1443,7 +1446,7 @@ namespace System.Management.Automation.Runspaces
|
|||
}
|
||||
|
||||
iss.Formats.Clear();
|
||||
foreach (var coreFormat in Platform.FormatFileNames)
|
||||
foreach (var coreFormat in s_PSCoreFormatFileNames)
|
||||
{
|
||||
iss.Formats.Add(new SessionStateFormatEntry(Path.Combine(psHome, coreFormat)));
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Collections;
|
|||
using System.Collections.Generic;
|
||||
using System.Dynamic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Management.Automation;
|
||||
using System.Management.Automation.Internal;
|
||||
|
@ -14,10 +15,8 @@ using System.Management.Automation.PSTasks;
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
using CommonParamSet = System.Management.Automation.Internal.CommonParameters;
|
||||
using Dbg = System.Management.Automation.Diagnostics;
|
||||
using NotNullWhen = System.Diagnostics.CodeAnalysis.NotNullWhenAttribute;
|
||||
|
||||
namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
|
@ -2648,19 +2647,46 @@ namespace Microsoft.PowerShell.Commands
|
|||
private SwitchParameter _off;
|
||||
|
||||
/// <summary>
|
||||
/// Handle 'latest', which we interpret to be the current version of PowerShell.
|
||||
/// To make it easier to specify a version, we add some conversions that wouldn't happen otherwise:
|
||||
/// * A simple integer, i.e. 2
|
||||
/// * A string without a dot, i.e. "2"
|
||||
/// * The string 'latest', which we interpret to be the current version of PowerShell.
|
||||
/// </summary>
|
||||
private sealed class ArgumentToPSVersionTransformationAttribute : ArgumentToVersionTransformationAttribute
|
||||
private sealed class ArgumentToVersionTransformationAttribute : ArgumentTransformationAttribute
|
||||
{
|
||||
protected override bool TryConvertFromString(string versionString, [NotNullWhen(true)] out Version version)
|
||||
public override object Transform(EngineIntrinsics engineIntrinsics, object inputData)
|
||||
{
|
||||
if (string.Equals("latest", versionString, StringComparison.OrdinalIgnoreCase))
|
||||
object version = PSObject.Base(inputData);
|
||||
|
||||
string versionStr = version as string;
|
||||
if (versionStr != null)
|
||||
{
|
||||
version = PSVersionInfo.PSVersion;
|
||||
return true;
|
||||
if (versionStr.Equals("latest", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return PSVersionInfo.PSVersion;
|
||||
}
|
||||
|
||||
if (versionStr.Contains('.'))
|
||||
{
|
||||
// If the string contains a '.', let the Version constructor handle the conversion.
|
||||
return inputData;
|
||||
}
|
||||
}
|
||||
|
||||
return base.TryConvertFromString(versionString, out version);
|
||||
if (version is double)
|
||||
{
|
||||
// The conversion to int below is wrong, but the usual conversions will turn
|
||||
// the double into a string, so just return the original object.
|
||||
return inputData;
|
||||
}
|
||||
|
||||
int majorVersion;
|
||||
if (LanguagePrimitives.TryConvertTo<int>(version, out majorVersion))
|
||||
{
|
||||
return new Version(majorVersion, 0);
|
||||
}
|
||||
|
||||
return inputData;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2685,7 +2711,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
/// Gets or sets strict mode in the current scope.
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "Version", Mandatory = true)]
|
||||
[ArgumentToPSVersionTransformation]
|
||||
[ArgumentToVersionTransformation]
|
||||
[ValidateVersion]
|
||||
[Alias("v")]
|
||||
public Version Version
|
||||
|
|
|
@ -1106,6 +1106,18 @@ namespace System.Management.Automation
|
|||
return false;
|
||||
}
|
||||
|
||||
// The function 'SHGetFileInfo()' does not understand reparse points and returns 0 ("non exe or error")
|
||||
// for a symbolic link file, so we try to get the immediate link target in that case.
|
||||
// Why not get the final target (use 'returnFinalTarget: true')? Because:
|
||||
// 1. When starting a process on Windows, if the 'FileName' is a symbolic link, the immediate link target will automatically be used,
|
||||
// but the OS does not do recursive resolution when the immediate link target is also a symbolic link.
|
||||
// 2. Keep the same behavior as before adopting the 'LinkTarget' and 'ResolveLinkTarget' APIs in .NET 6.
|
||||
string linkTarget = File.ResolveLinkTarget(fileName, returnFinalTarget: false)?.FullName;
|
||||
if (linkTarget is not null)
|
||||
{
|
||||
fileName = linkTarget;
|
||||
}
|
||||
|
||||
SHFILEINFO shinfo = new SHFILEINFO();
|
||||
IntPtr type = SHGetFileInfo(fileName, 0, ref shinfo, (uint)Marshal.SizeOf(shinfo), SHGFI_EXETYPE);
|
||||
|
||||
|
|
|
@ -64,7 +64,6 @@ namespace System.Management.Automation
|
|||
private static readonly SemanticVersion s_psV62Version = new SemanticVersion(6, 2, 0, preReleaseLabel: null, buildLabel: null);
|
||||
private static readonly SemanticVersion s_psV7Version = new SemanticVersion(7, 0, 0, preReleaseLabel: null, buildLabel: null);
|
||||
private static readonly SemanticVersion s_psV71Version = new SemanticVersion(7, 1, 0, preReleaseLabel: null, buildLabel: null);
|
||||
private static readonly SemanticVersion s_psV72Version = new SemanticVersion(7, 2, 0, preReleaseLabel: null, buildLabel: null);
|
||||
private static readonly SemanticVersion s_psSemVersion;
|
||||
private static readonly Version s_psVersion;
|
||||
|
||||
|
@ -111,7 +110,7 @@ namespace System.Management.Automation
|
|||
s_psVersionTable[PSVersionInfo.PSVersionName] = s_psSemVersion;
|
||||
s_psVersionTable[PSVersionInfo.PSEditionName] = PSEditionValue;
|
||||
s_psVersionTable[PSGitCommitIdName] = rawGitCommitId;
|
||||
s_psVersionTable[PSCompatibleVersionsName] = new Version[] { s_psV1Version, s_psV2Version, s_psV3Version, s_psV4Version, s_psV5Version, s_psV51Version, s_psV6Version, s_psV61Version, s_psV62Version, s_psV7Version, s_psV71Version, s_psV72Version, s_psVersion };
|
||||
s_psVersionTable[PSCompatibleVersionsName] = new Version[] { s_psV1Version, s_psV2Version, s_psV3Version, s_psV4Version, s_psV5Version, s_psV51Version, s_psV6Version, s_psV61Version, s_psV62Version, s_psV7Version, s_psV71Version, s_psVersion };
|
||||
s_psVersionTable[PSVersionInfo.SerializationVersionName] = new Version(InternalSerializer.DefaultVersion);
|
||||
s_psVersionTable[PSVersionInfo.PSRemotingProtocolVersionName] = RemotingConstants.ProtocolVersion;
|
||||
s_psVersionTable[PSVersionInfo.WSManStackVersionName] = GetWSManStackVersion();
|
||||
|
|
|
@ -1535,25 +1535,6 @@ namespace System.Management.Automation.Language
|
|||
token = NextToken();
|
||||
} while (token.Kind == TokenKind.Comma);
|
||||
|
||||
// The dimensions for an array must be less than or equal to 32.
|
||||
// Search the doc for 'Type.MakeArrayType(int rank)' for more details.
|
||||
if (dim > 32)
|
||||
{
|
||||
// If the next token is right bracket, we swallow it to make it easier to parse the rest of script.
|
||||
// Otherwise, we unget the token for the subsequent parsing to consume.
|
||||
if (token.Kind != TokenKind.RBracket)
|
||||
{
|
||||
UngetToken(token);
|
||||
}
|
||||
|
||||
ReportError(
|
||||
ExtentOf(firstTokenAfterLBracket, lastComma),
|
||||
nameof(ParserStrings.ArrayHasTooManyDimensions),
|
||||
ParserStrings.ArrayHasTooManyDimensions,
|
||||
arg: dim);
|
||||
break;
|
||||
}
|
||||
|
||||
if (token.Kind != TokenKind.RBracket)
|
||||
{
|
||||
// ErrorRecovery: just pretend we saw a ']'.
|
||||
|
|
|
@ -1762,39 +1762,7 @@ namespace System.Management.Automation.Remoting.Client
|
|||
|
||||
while (true)
|
||||
{
|
||||
string error;
|
||||
|
||||
if (ExperimentalFeature.IsEnabled(ExperimentalFeature.PSRemotingSSHTransportErrorHandling))
|
||||
{
|
||||
// Blocking read from StdError stream
|
||||
error = reader.ReadLine();
|
||||
|
||||
if (error == null)
|
||||
{
|
||||
// Stream is closed unexpectedly.
|
||||
throw new PSInvalidOperationException(RemotingErrorIdStrings.SSHAbruptlyTerminated);
|
||||
}
|
||||
|
||||
if (error.Length == 0)
|
||||
{
|
||||
// Ignore
|
||||
continue;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Messages in error stream from ssh are unreliable, and may just be warnings or
|
||||
// banner text.
|
||||
// So just report the messages but don't act on them.
|
||||
System.Console.WriteLine(error);
|
||||
}
|
||||
catch (IOException)
|
||||
{ }
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
error = ReadError(reader);
|
||||
string error = ReadError(reader);
|
||||
|
||||
if (error.Length == 0)
|
||||
{
|
||||
|
|
|
@ -296,9 +296,6 @@ Possible matches are</value>
|
|||
<data name="CannotIndexWithByRefLikeReturnType" xml:space="preserve">
|
||||
<value>Unable to index into an object of type "{0}" with the ByRef-like return type "{1}". ByRef-like types are not supported in PowerShell.</value>
|
||||
</data>
|
||||
<data name="ArrayHasTooManyDimensions" xml:space="preserve">
|
||||
<value>The array has too many dimensions: {0}. The number of dimensions for an array must be less than or equal to 32.</value>
|
||||
</data>
|
||||
<data name="ArrayAssignmentFailed" xml:space="preserve">
|
||||
<value>Array assignment to [{0}] failed: {1}.</value>
|
||||
</data>
|
||||
|
|
|
@ -391,14 +391,6 @@ namespace System.Management.Automation.Security
|
|||
/// <returns>True if the COM object is allowed, False otherwise.</returns>
|
||||
internal static bool IsClassInApprovedList(Guid clsid)
|
||||
{
|
||||
// This method is called only if there is an AppLocker and/or WLDP system wide lock down enforcement policy.
|
||||
if (s_cachedWldpSystemPolicy.GetValueOrDefault(SystemEnforcementMode.None) != SystemEnforcementMode.Enforce)
|
||||
{
|
||||
// No WLDP policy implies only AppLocker policy enforcement. Disallow all COM object instantiation.
|
||||
return false;
|
||||
}
|
||||
|
||||
// WLDP policy must be in system wide enforcement, look up COM Id in WLDP approval list.
|
||||
try
|
||||
{
|
||||
WLDP_HOST_INFORMATION hostInformation = new WLDP_HOST_INFORMATION();
|
||||
|
|
|
@ -25,18 +25,7 @@ Describe "Verify Markdown Links" {
|
|||
Get-Job | Remove-Job -Force
|
||||
}
|
||||
|
||||
$gciParams = @{}
|
||||
if ($env:MARKDOWN_FOLDER) {
|
||||
$gciParams["Path"] = (Join-Path -Path $env:MARKDOWN_FOLDER -ChildPath '*.md')
|
||||
} else {
|
||||
$gciParams["Path"] = "$PSScriptRoot\..\..\..\*.md"
|
||||
}
|
||||
|
||||
if ($env:MARKDOWN_RECURSE -ne 'False') {
|
||||
$gciParams["Recurse"] = $true
|
||||
}
|
||||
|
||||
$groups = Get-ChildItem @gciParams | Where-Object {$_.DirectoryName -notlike '*node_modules*'} | Group-Object -Property directory
|
||||
$groups = Get-ChildItem -Path "$PSScriptRoot\..\..\..\*.md" -Recurse | Where-Object {$_.DirectoryName -notlike '*node_modules*'} | Group-Object -Property directory
|
||||
|
||||
$jobs = @{}
|
||||
# start all link verification in parallel
|
|
@ -6,7 +6,7 @@
|
|||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommandLineParser" Version="2.8.0" />
|
||||
<PackageReference Include="CommandLineParser" Version="2.9.0-preview1" />
|
||||
<PackageReference Include="MarkdownLog.NS20" Version="0.10.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
|
||||
<PackageReference Include="BenchmarkDotNet" Version="0.13.1" />
|
||||
|
|
|
@ -23,7 +23,7 @@ Describe "PSVersionTable" -Tags "CI" {
|
|||
$unexpectectGitCommitIdPattern = $fullVersionPattern
|
||||
}
|
||||
|
||||
$powerShellVersions = "1.0", "2.0", "3.0", "4.0", "5.0", "5.1", "6.0", "6.1", "6.2", "7.0", "7.1", "7.2", "7.3"
|
||||
$powerShellVersions = "1.0", "2.0", "3.0", "4.0", "5.0", "5.1", "6.0", "6.1", "6.2", "7.0", "7.1", "7.2"
|
||||
$powerShellCompatibleVersions = $PSVersionTable.PSCompatibleVersions |
|
||||
ForEach-Object {$_.ToString(2).SubString(0,3)}
|
||||
}
|
||||
|
|
|
@ -1097,14 +1097,6 @@ Describe "TabCompletion" -Tags CI {
|
|||
$entry.CompletionText | Should -BeExactly "Mandatory"
|
||||
}
|
||||
|
||||
It "Test Attribute scriptblock completion" {
|
||||
$inputStr = '[ValidateScript({Get-Child})]$Test=ls'
|
||||
$res = TabExpansion2 -inputScript $inputStr -cursorColumn ($inputStr.IndexOf('}'))
|
||||
$res.CompletionMatches | Should -HaveCount 1
|
||||
$entry = $res.CompletionMatches | Where-Object CompletionText -EQ "Get-ChildItem"
|
||||
$entry.CompletionText | Should -BeExactly "Get-ChildItem"
|
||||
}
|
||||
|
||||
It "Test completion with line continuation" {
|
||||
$inputStr = @'
|
||||
dir -Recurse `
|
||||
|
@ -1142,27 +1134,6 @@ dir -Recurse `
|
|||
$res.CompletionMatches | Should -HaveCount 4
|
||||
[string]::Join(',', ($res.CompletionMatches.completiontext | Sort-Object)) | Should -BeExactly "-Path,-PipelineVariable,-PSPath,-pv"
|
||||
}
|
||||
|
||||
It "Test completion for HttpVersion parameter name" {
|
||||
$inputStr = 'Invoke-WebRequest -HttpV'
|
||||
$res = TabExpansion2 -inputScript $inputStr -cursorColumn $inputStr.Length
|
||||
$res.CompletionMatches | Should -HaveCount 1
|
||||
$res.CompletionMatches[0].CompletionText | Should -BeExactly "-HttpVersion"
|
||||
}
|
||||
|
||||
It "Test completion for HttpVersion parameter" {
|
||||
$inputStr = 'Invoke-WebRequest -HttpVersion '
|
||||
$res = TabExpansion2 -inputScript $inputStr -cursorColumn $inputStr.Length
|
||||
$res.CompletionMatches | Should -HaveCount 4
|
||||
[string]::Join(',', ($res.CompletionMatches.completiontext | Sort-Object)) | Should -BeExactly "1.0,1.1,2.0,3.0"
|
||||
}
|
||||
|
||||
It "Test completion for HttpVersion parameter with input" {
|
||||
$inputStr = 'Invoke-WebRequest -HttpVersion 1'
|
||||
$res = TabExpansion2 -inputScript $inputStr -cursorColumn $inputStr.Length
|
||||
$res.CompletionMatches | Should -HaveCount 2
|
||||
[string]::Join(',', ($res.CompletionMatches.completiontext | Sort-Object)) | Should -BeExactly "1.0,1.1"
|
||||
}
|
||||
}
|
||||
|
||||
Context "Module completion for 'using module'" {
|
||||
|
|
|
@ -626,21 +626,3 @@ Describe "Keywords 'default', 'hidden', 'in', 'static' Token parsing" -Tags CI {
|
|||
. $Keyword | Should -BeExactly $Keyword
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Parsing array that has too many dimensions" -Tag CI {
|
||||
It "ParseError for '<Script>'" -TestCases @(
|
||||
@{ Script = '[int[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'; ErrorId = @('ArrayHasTooManyDimensions', 'EndSquareBracketExpectedAtEndOfAttribute'); StartOffset = @(5, 37); EndOffset = @(37, 37) }
|
||||
@{ Script = '[int[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,]'; ErrorId = @('ArrayHasTooManyDimensions', 'EndSquareBracketExpectedAtEndOfAttribute'); StartOffset = @(5, 38); EndOffset = @(37, 38) }
|
||||
@{ Script = '[int[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,]]'; ErrorId = @('ArrayHasTooManyDimensions'); StartOffset = @(5); EndOffset = @(37) }
|
||||
) {
|
||||
param($Script, $ErrorId, $StartOffset, $EndOffset)
|
||||
|
||||
$errs = Get-ParseResults -src $Script
|
||||
$errs.Count | Should -Be $ErrorId.Count
|
||||
for ($i = 0; $i -lt $errs.Count; $i++) {
|
||||
$errs[$i].ErrorId | Should -BeExactly $ErrorId[$i]
|
||||
$errs[$i].Extent.StartScriptPosition.Offset | Should -Be $StartOffset[$i]
|
||||
$errs[$i].Extent.EndScriptPosition.Offset | Should -Be $EndOffset[$i]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -252,48 +252,3 @@ Categories=Application;
|
|||
{ $dllFile = "$PSHOME\System.Management.Automation.dll"; & $dllFile } | Should -Throw -ErrorId "NativeCommandFailed"
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Run native command from a mounted FAT-format VHD" -tags @("Feature", "RequireAdminOnWindows") {
|
||||
BeforeAll {
|
||||
if (-not $IsWindows) {
|
||||
return;
|
||||
}
|
||||
|
||||
$vhdx = Join-Path -Path $TestDrive -ChildPath ncp.vhdx
|
||||
|
||||
if (Test-Path -Path $vhdx) {
|
||||
Remove-item -Path $vhdx -Force
|
||||
}
|
||||
|
||||
$create_vhdx = Join-Path -Path $TestDrive -ChildPath 'create_vhdx.txt'
|
||||
|
||||
Set-Content -Path $create_vhdx -Force -Value @"
|
||||
create vdisk file="$vhdx" maximum=20 type=fixed
|
||||
select vdisk file="$vhdx"
|
||||
attach vdisk
|
||||
convert mbr
|
||||
create partition primary
|
||||
format fs=fat
|
||||
assign letter="T"
|
||||
detach vdisk
|
||||
"@
|
||||
|
||||
diskpart.exe /s $create_vhdx
|
||||
Mount-DiskImage -ImagePath $vhdx > $null
|
||||
|
||||
Copy-Item "$env:WinDir\System32\whoami.exe" T:\whoami.exe
|
||||
}
|
||||
|
||||
AfterAll {
|
||||
if ($IsWindows) {
|
||||
Dismount-DiskImage -ImagePath $vhdx
|
||||
Remove-Item $vhdx, $create_vhdx -Force
|
||||
}
|
||||
}
|
||||
|
||||
It "Should run 'whoami.exe' from FAT file system without error" -Skip:(!$IsWindows) {
|
||||
$expected = & "$env:WinDir\System32\whoami.exe"
|
||||
$result = T:\whoami.exe
|
||||
$result | Should -BeExactly $expected
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ Describe "Requires tests" -Tags "CI" {
|
|||
BeforeAll {
|
||||
$currentVersion = $PSVersionTable.PSVersion
|
||||
|
||||
$powerShellVersions = "1.0", "2.0", "3.0", "4.0", "5.0", "5.1", "6.0", "6.1", "6.2", "7.0", "7.1", "7.2", "7.3"
|
||||
$powerShellVersions = "1.0", "2.0", "3.0", "4.0", "5.0", "5.1", "6.0", "6.1", "6.2", "7.0", "7.1", "7.2"
|
||||
$latestVersion = [version]($powerShellVersions | Sort-Object -Descending -Top 1)
|
||||
$nonExistingMinor = "$($latestVersion.Major).$($latestVersion.Minor + 1)"
|
||||
$nonExistingMajor = "$($latestVersion.Major + 1).0"
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
$FeatureEnabled = $EnabledExperimentalFeatures.Contains('Microsoft.PowerShell.Utility.PSDebugRunspaceWithBreakpoints')
|
||||
|
||||
Describe "`Enable-RunspaceDebug -Breakpoint` Unit Tests - Feature-Enabled" -Tags "CI" {
|
||||
|
||||
BeforeAll {
|
||||
if (!$FeatureEnabled) {
|
||||
Write-Verbose "Test Suite Skipped. The test suite requires the experimental feature 'Microsoft.PowerShell.Utility.PSDebugRunspaceWithBreakpoints' to be enabled." -Verbose
|
||||
$originalDefaultParameterValues = $PSDefaultParameterValues.Clone()
|
||||
$PSDefaultParameterValues["it:skip"] = $true
|
||||
return
|
||||
}
|
||||
|
||||
#Set up script file 1
|
||||
$scriptFileName1 = Join-Path $TestDrive -ChildPath breakpointTestScript.ps1
|
||||
|
||||
$contents = @"
|
||||
function Hello
|
||||
{
|
||||
`$greeting = 'Hello, world!'
|
||||
write-host `$greeting
|
||||
}
|
||||
|
||||
function Goodbye
|
||||
{
|
||||
`$message = 'Good bye, cruel world!'
|
||||
write-host `$message
|
||||
}
|
||||
|
||||
Hello
|
||||
Goodbye
|
||||
"@
|
||||
|
||||
$contents > $scriptFileName1
|
||||
|
||||
# The breakpoints are created here because when the tests are run with the experimental feature off,
|
||||
# this command does not exist and the Pester tests fail to work
|
||||
$breakpointArr = @(
|
||||
New-PSBreakpoint -Line 12 $scriptFileName1
|
||||
New-PSBreakpoint -Line 13 $scriptFileName1
|
||||
)
|
||||
|
||||
$iss = [initialsessionstate]::CreateDefault2();
|
||||
$testRunspace1 = [runspacefactory]::CreateRunspace($iss)
|
||||
$testRunspace1.Name = "TestRunspaceDebuggerReset"
|
||||
$testRunspace1.Open()
|
||||
}
|
||||
|
||||
AfterAll {
|
||||
if (!$FeatureEnabled) {
|
||||
$global:PSDefaultParameterValues = $originalDefaultParameterValues
|
||||
return
|
||||
}
|
||||
|
||||
# Clean up
|
||||
$testRunspace1.Dispose()
|
||||
}
|
||||
|
||||
It "Can set breakpoints in the runspace - <Name>" -TestCases @(
|
||||
@{
|
||||
Name = "Current runspace"
|
||||
Runspace = [System.Management.Automation.Runspaces.Runspace]::DefaultRunspace
|
||||
Breakpoints = $breakpointArr
|
||||
},
|
||||
@{
|
||||
Name = $testRunspace1.Name
|
||||
Runspace = $testRunspace1
|
||||
Breakpoints = $breakpointArr
|
||||
}
|
||||
) {
|
||||
param($Runspace, $Breakpoints)
|
||||
Enable-RunspaceDebug -Breakpoint $Breakpoints -Runspace $Runspace
|
||||
$Runspace.Debugger.GetBreakpoints() | Should -Be @($Breakpoints)
|
||||
}
|
||||
}
|
|
@ -1670,10 +1670,10 @@ Describe "Json Bug fixes" -Tags "Feature" {
|
|||
|
||||
$testCases = @(
|
||||
@{
|
||||
Name = "ConvertTo-Json -Depth 101 throws ParameterArgumentValidationError when the user specifies a depth greater than 100."
|
||||
Name = "ConvertTo-Json -Depth 101 throws MaximumAllowedDepthReached when the user specifies a depth greater than 100."
|
||||
NumberOfElements = 10
|
||||
MaxDepth = 101
|
||||
FullyQualifiedErrorId = "ParameterArgumentValidationError,Microsoft.PowerShell.Commands.ConvertToJsonCommand"
|
||||
FullyQualifiedErrorId = "ReachedMaximumDepthAllowed,Microsoft.PowerShell.Commands.ConvertToJsonCommand"
|
||||
ShouldThrow = $true
|
||||
}
|
||||
@{
|
||||
|
|
|
@ -19,33 +19,15 @@ Describe "Tee-Object" -Tags "CI" {
|
|||
Remove-Item -Path $testfile -ErrorAction SilentlyContinue -Force
|
||||
}
|
||||
|
||||
It "Should return the output to the screen and to the variable" {
|
||||
Write-Output teeobjecttest1 | Tee-Object -Variable teeresults
|
||||
$teeresults | Should -BeExactly "teeobjecttest1"
|
||||
}
|
||||
It "Should return the output to the screen and to the variable" {
|
||||
Write-Output teeobjecttest1 | Tee-Object -Variable teeresults
|
||||
$teeresults | Should -BeExactly "teeobjecttest1"
|
||||
}
|
||||
|
||||
It "Should tee the output to a file" {
|
||||
$teefile = $testfile
|
||||
Write-Output teeobjecttest3 | Tee-Object $teefile
|
||||
Get-Content $teefile | Should -BeExactly "teeobjecttest3"
|
||||
}
|
||||
|
||||
$unicodeTestString = "A1£ę௸🤔"
|
||||
It "Should tee output to file using <encoding> encoding when selected" -TestCases @(
|
||||
@{ Encoding = "ascii"; Content = "teeobjecttest1"},
|
||||
@{ Encoding = "bigendianunicode"; Content = $unicodeTestString },
|
||||
@{ Encoding = "default"; Content = $unicodeTestString },
|
||||
@{ Encoding = "latin1"; Content = "téèõbjêcttëst1" },
|
||||
@{ Encoding = "unicode"; Content = $unicodeTestString },
|
||||
@{ Encoding = "utf32"; Content = $unicodeTestString },
|
||||
@{ Encoding = "utf7"; Content = $unicodeTestString},
|
||||
@{ Encoding = "utf8"; Content = $unicodeTestString}
|
||||
) {
|
||||
param($Encoding, $Content)
|
||||
$teefile = $testfile
|
||||
Write-Output -InputObject $content | Tee-Object -FilePath $teefile -Encoding $Encoding
|
||||
Get-Content -Path $teefile -Encoding $Encoding | Should -BeExactly $content
|
||||
Remove-Item -Path $teefile -ErrorAction SilentlyContinue
|
||||
It "Should tee the output to a file" {
|
||||
$teefile = $testfile
|
||||
Write-Output teeobjecttest3 | Tee-Object $teefile
|
||||
Get-Content $teefile | Should -BeExactly "teeobjecttest3"
|
||||
}
|
||||
|
||||
It "Parameter 'Encoding' should accept encoding" {
|
||||
|
|
|
@ -469,23 +469,6 @@ Describe "Invoke-WebRequest tests" -Tags "Feature", "RequireAdminOnWindows" {
|
|||
$result.Output.Headers.Connection | Should -Be "Close"
|
||||
}
|
||||
|
||||
It "Validate Invoke-WebRequest -HttpVersion '<httpVersion>'" -Skip:(!$IsWindows) -TestCases @(
|
||||
@{ httpVersion = '1.1'},
|
||||
@{ httpVersion = '2'}
|
||||
) {
|
||||
param($httpVersion)
|
||||
# Operation options
|
||||
$uri = Get-WebListenerUrl -Test 'Get' -Https
|
||||
$command = "Invoke-WebRequest -Uri $uri -HttpVersion $httpVersion -SkipCertificateCheck"
|
||||
|
||||
$result = ExecuteWebCommand -command $command
|
||||
ValidateResponse -response $result
|
||||
|
||||
# Validate response content
|
||||
$jsonContent = $result.Output.Content | ConvertFrom-Json
|
||||
$jsonContent.protocol | Should -Be "HTTP/$httpVersion"
|
||||
}
|
||||
|
||||
It "Validate Invoke-WebRequest -MaximumRedirection" {
|
||||
$uri = Get-WebListenerUrl -Test 'Redirect' -TestValue '3'
|
||||
$command = "Invoke-WebRequest -Uri '$uri' -MaximumRedirection 4"
|
||||
|
@ -1950,48 +1933,6 @@ Describe "Invoke-WebRequest tests" -Tags "Feature", "RequireAdminOnWindows" {
|
|||
$response = Invoke-WebRequest -Uri $dosUri
|
||||
$response.Images | Should -Not -BeNullOrEmpty
|
||||
}
|
||||
|
||||
$singleInputExpected = @(
|
||||
@{ Name = 'foo'; Value = 'bar' }
|
||||
)
|
||||
|
||||
It 'correctly parses input tag(s) for `<markup>`' -TestCases @(
|
||||
@{
|
||||
Markup = "<input name='foo' value='bar'>";
|
||||
ExpectedFields = $singleInputExpected
|
||||
},
|
||||
@{
|
||||
Markup = "<input name='foo' value='bar'/>";
|
||||
ExpectedFields = $singleInputExpected
|
||||
},
|
||||
@{
|
||||
Markup = "<input name='foo' value='bar'>baz</input>";
|
||||
ExpectedFields = $singleInputExpected
|
||||
}
|
||||
@{
|
||||
Markup = "<input name='item1' value='bar'><input name='item2' value='foo'><input name='item3'></input><input name='item4' value='fu'><input name='item5' value='bahr'/>";
|
||||
ExpectedFields = @(
|
||||
@{ Name = 'item1'; Value = 'bar'},
|
||||
@{ Name = 'item2'; Value = 'foo' },
|
||||
@{ Name = 'item3'; Value = $null },
|
||||
@{ Name = 'item4'; Value = 'fu' },
|
||||
@{ Name = 'item5'; Value = 'bahr' }
|
||||
)
|
||||
}
|
||||
) {
|
||||
param($markup, $expectedFields)
|
||||
$query = @{
|
||||
contenttype = 'text/html'
|
||||
body = "<html><body>${markup}</body></html>"
|
||||
}
|
||||
$uri = Get-WebListenerUrl -Test 'Response' -Query $query
|
||||
$response = Invoke-WebRequest -Uri $uri -UseBasicParsing
|
||||
$response.Error | Should -BeNullOrEmpty
|
||||
ForEach ($expectedField in $expectedFields) {
|
||||
$actualField = $response.InputFields.FindByName($expectedField.Name)
|
||||
$actualField.Value | Should -Be $expectedField.Value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Context "Denial of service" -Tag 'DOS' {
|
||||
|
@ -2135,21 +2076,6 @@ Describe "Invoke-RestMethod tests" -Tags "Feature", "RequireAdminOnWindows" {
|
|||
$result.Output.Headers.Connection | Should -Be "Close"
|
||||
}
|
||||
|
||||
It "Validate Invoke-RestMethod -HttpVersion '<httpVersion>'" -Skip:(!$IsWindows) -TestCases @(
|
||||
@{ httpVersion = '1.1'},
|
||||
@{ httpVersion = '2'}
|
||||
) {
|
||||
param($httpVersion)
|
||||
# Operation options
|
||||
$uri = Get-WebListenerUrl -Test 'Get' -Https
|
||||
$command = "Invoke-RestMethod -Uri $uri -HttpVersion $httpVersion -SkipCertificateCheck"
|
||||
|
||||
$result = ExecuteWebCommand -command $command
|
||||
|
||||
# Validate response
|
||||
$result.Output.protocol | Should -Be "HTTP/$httpVersion"
|
||||
}
|
||||
|
||||
It "Validate Invoke-RestMethod -MaximumRedirection" {
|
||||
$uri = Get-WebListenerUrl -Test 'Redirect' -TestValue '3'
|
||||
$command = "Invoke-RestMethod -Uri '$uri' -MaximumRedirection 4"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Windows.Compatibility" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Windows.Compatibility" Version="6.0.0-rc.2.21480.5" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Http.Extensions;
|
||||
using mvc.Models;
|
||||
|
@ -28,13 +32,12 @@ namespace mvc.Controllers
|
|||
|
||||
Hashtable output = new Hashtable
|
||||
{
|
||||
{ "args", args },
|
||||
{ "headers", headers },
|
||||
{ "origin", Request.HttpContext.Connection.RemoteIpAddress.ToString() },
|
||||
{ "url", UriHelper.GetDisplayUrl(Request) },
|
||||
{ "query", Request.QueryString.ToUriComponent() },
|
||||
{ "method", Request.Method },
|
||||
{ "protocol", Request.Protocol }
|
||||
{"args", args},
|
||||
{"headers", headers},
|
||||
{"origin", Request.HttpContext.Connection.RemoteIpAddress.ToString()},
|
||||
{"url", UriHelper.GetDisplayUrl(Request)},
|
||||
{"query", Request.QueryString.ToUriComponent()},
|
||||
{"method", Request.Method}
|
||||
};
|
||||
|
||||
if (Request.HasFormContentType)
|
||||
|
|
|
@ -2,13 +2,18 @@
|
|||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Security.Authentication;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Server.Kestrel.Https;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace mvc
|
||||
{
|
||||
|
@ -29,79 +34,52 @@ namespace mvc
|
|||
WebHost.CreateDefaultBuilder()
|
||||
.UseStartup<Startup>().UseKestrel(options =>
|
||||
{
|
||||
options.AllowSynchronousIO = true;
|
||||
|
||||
options.Listen(
|
||||
IPAddress.Loopback,
|
||||
int.Parse(args[2]),
|
||||
listenOptions =>
|
||||
{
|
||||
listenOptions.Protocols = Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols.Http1AndHttp2;
|
||||
});
|
||||
|
||||
options.Listen(
|
||||
IPAddress.Loopback,
|
||||
int.Parse(args[3]),
|
||||
listenOptions =>
|
||||
{
|
||||
var certificate = new X509Certificate2(args[0], args[1]);
|
||||
HttpsConnectionAdapterOptions httpsOption = new HttpsConnectionAdapterOptions();
|
||||
httpsOption.SslProtocols = SslProtocols.Tls12;
|
||||
httpsOption.ClientCertificateMode = ClientCertificateMode.AllowCertificate;
|
||||
httpsOption.ClientCertificateValidation = (inCertificate, inChain, inPolicy) => { return true; };
|
||||
httpsOption.CheckCertificateRevocation = false;
|
||||
httpsOption.ServerCertificate = certificate;
|
||||
listenOptions.UseHttps(httpsOption);
|
||||
listenOptions.Protocols = Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols.Http1AndHttp2;
|
||||
});
|
||||
|
||||
options.Listen(
|
||||
IPAddress.Loopback,
|
||||
int.Parse(args[4]),
|
||||
listenOptions =>
|
||||
{
|
||||
var certificate = new X509Certificate2(args[0], args[1]);
|
||||
HttpsConnectionAdapterOptions httpsOption = new HttpsConnectionAdapterOptions();
|
||||
httpsOption.SslProtocols = SslProtocols.Tls11;
|
||||
httpsOption.ClientCertificateMode = ClientCertificateMode.AllowCertificate;
|
||||
httpsOption.ClientCertificateValidation = (inCertificate, inChain, inPolicy) => { return true; };
|
||||
httpsOption.CheckCertificateRevocation = false;
|
||||
httpsOption.ServerCertificate = certificate;
|
||||
listenOptions.UseHttps(httpsOption);
|
||||
listenOptions.Protocols = Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols.Http1AndHttp2;
|
||||
});
|
||||
|
||||
options.Listen(
|
||||
IPAddress.Loopback,
|
||||
int.Parse(args[5]),
|
||||
listenOptions =>
|
||||
{
|
||||
var certificate = new X509Certificate2(args[0], args[1]);
|
||||
HttpsConnectionAdapterOptions httpsOption = new HttpsConnectionAdapterOptions();
|
||||
httpsOption.SslProtocols = SslProtocols.Tls;
|
||||
httpsOption.ClientCertificateMode = ClientCertificateMode.AllowCertificate;
|
||||
httpsOption.ClientCertificateValidation = (inCertificate, inChain, inPolicy) => { return true; };
|
||||
httpsOption.CheckCertificateRevocation = false;
|
||||
httpsOption.ServerCertificate = certificate;
|
||||
listenOptions.UseHttps(httpsOption);
|
||||
listenOptions.Protocols = Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols.Http1AndHttp2;
|
||||
});
|
||||
|
||||
options.Listen(
|
||||
IPAddress.Loopback,
|
||||
int.Parse(args[6]),
|
||||
listenOptions =>
|
||||
{
|
||||
var certificate = new X509Certificate2(args[0], args[1]);
|
||||
HttpsConnectionAdapterOptions httpsOption = new HttpsConnectionAdapterOptions();
|
||||
httpsOption.SslProtocols = SslProtocols.Tls13;
|
||||
httpsOption.ClientCertificateMode = ClientCertificateMode.AllowCertificate;
|
||||
httpsOption.ClientCertificateValidation = (inCertificate, inChain, inPolicy) => { return true; };
|
||||
httpsOption.CheckCertificateRevocation = false;
|
||||
httpsOption.ServerCertificate = certificate;
|
||||
listenOptions.UseHttps(httpsOption);
|
||||
listenOptions.Protocols = Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols.Http1AndHttp2;
|
||||
});
|
||||
options.AllowSynchronousIO = true;
|
||||
options.Listen(IPAddress.Loopback, int.Parse(args[2]));
|
||||
options.Listen(IPAddress.Loopback, int.Parse(args[3]), listenOptions =>
|
||||
{
|
||||
var certificate = new X509Certificate2(args[0], args[1]);
|
||||
HttpsConnectionAdapterOptions httpsOption = new HttpsConnectionAdapterOptions();
|
||||
httpsOption.SslProtocols = SslProtocols.Tls12;
|
||||
httpsOption.ClientCertificateMode = ClientCertificateMode.AllowCertificate;
|
||||
httpsOption.ClientCertificateValidation = (inCertificate, inChain, inPolicy) => { return true; };
|
||||
httpsOption.CheckCertificateRevocation = false;
|
||||
httpsOption.ServerCertificate = certificate;
|
||||
listenOptions.UseHttps(httpsOption);
|
||||
});
|
||||
options.Listen(IPAddress.Loopback, int.Parse(args[4]), listenOptions =>
|
||||
{
|
||||
var certificate = new X509Certificate2(args[0], args[1]);
|
||||
HttpsConnectionAdapterOptions httpsOption = new HttpsConnectionAdapterOptions();
|
||||
httpsOption.SslProtocols = SslProtocols.Tls11;
|
||||
httpsOption.ClientCertificateMode = ClientCertificateMode.AllowCertificate;
|
||||
httpsOption.ClientCertificateValidation = (inCertificate, inChain, inPolicy) => { return true; };
|
||||
httpsOption.CheckCertificateRevocation = false;
|
||||
httpsOption.ServerCertificate = certificate;
|
||||
listenOptions.UseHttps(httpsOption);
|
||||
});
|
||||
options.Listen(IPAddress.Loopback, int.Parse(args[5]), listenOptions =>
|
||||
{
|
||||
var certificate = new X509Certificate2(args[0], args[1]);
|
||||
HttpsConnectionAdapterOptions httpsOption = new HttpsConnectionAdapterOptions();
|
||||
httpsOption.SslProtocols = SslProtocols.Tls;
|
||||
httpsOption.ClientCertificateMode = ClientCertificateMode.AllowCertificate;
|
||||
httpsOption.ClientCertificateValidation = (inCertificate, inChain, inPolicy) => { return true; };
|
||||
httpsOption.CheckCertificateRevocation = false;
|
||||
httpsOption.ServerCertificate = certificate;
|
||||
listenOptions.UseHttps(httpsOption);
|
||||
});
|
||||
options.Listen(IPAddress.Loopback, int.Parse(args[6]), listenOptions =>
|
||||
{
|
||||
var certificate = new X509Certificate2(args[0], args[1]);
|
||||
HttpsConnectionAdapterOptions httpsOption = new HttpsConnectionAdapterOptions();
|
||||
httpsOption.SslProtocols = SslProtocols.Tls13;
|
||||
httpsOption.ClientCertificateMode = ClientCertificateMode.AllowCertificate;
|
||||
httpsOption.ClientCertificateValidation = (inCertificate, inChain, inPolicy) => { return true; };
|
||||
httpsOption.CheckCertificateRevocation = false;
|
||||
httpsOption.ServerCertificate = certificate;
|
||||
listenOptions.UseHttps(httpsOption);
|
||||
});
|
||||
})
|
||||
.Build();
|
||||
}
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.0" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.0-rc.2.21480.10" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0-rc.2.21480.5" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Management.Automation;
|
||||
|
||||
using Xunit;
|
||||
|
||||
namespace PSTests.Parallel
|
||||
{
|
||||
public class ArgumentToVersionTransformationAttributeTests
|
||||
{
|
||||
[Theory]
|
||||
[MemberData(nameof(TestCases))]
|
||||
public void TestConversion(object inputData, object expected)
|
||||
{
|
||||
var transformation = new ArgumentToVersionTransformationAttribute();
|
||||
var result = transformation.Transform(default, inputData);
|
||||
|
||||
Assert.Equal(expected, result);
|
||||
}
|
||||
|
||||
public static IEnumerable<object[]> TestCases()
|
||||
{
|
||||
// strings
|
||||
yield return new object[] { "1.1", "1.1" };
|
||||
yield return new object[] { "1", new Version(1, 0) };
|
||||
yield return new object[] { string.Empty, new Version(0, 0) };
|
||||
|
||||
// doubles
|
||||
yield return new object[] { 1.0, 1.0 };
|
||||
yield return new object[] { 1.1, 1.1 };
|
||||
|
||||
// ints
|
||||
yield return new object[] { 1, new Version(1, 0) };
|
||||
yield return new object[] { 2, new Version(2, 0) };
|
||||
|
||||
// PSObjects
|
||||
yield return new object[] { new PSObject(obj: 0), new Version(0, 0) };
|
||||
yield return new object[] { new PSObject(obj: 1), new Version(1, 0) };
|
||||
|
||||
// unhandled
|
||||
var obj = new object();
|
||||
yield return new object[] { obj, obj };
|
||||
|
||||
var date = DateTimeOffset.UtcNow;
|
||||
yield return new object[] { date, date };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -26,8 +26,8 @@
|
|||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="Xunit.SkippableFact" Version="1.4.13" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
|
||||
<PackageReference Include="XunitXml.TestLogger" Version="3.0.70" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
|
||||
<PackageReference Include="XunitXml.TestLogger" Version="3.0.66" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -1,135 +0,0 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
Class CgData {
|
||||
[pscredential]$Pat
|
||||
[string]$Organization
|
||||
[string]$Project
|
||||
|
||||
CgData ([pscredential]$Pat, [string]$Organization, [string]$Project) {
|
||||
$this.Pat = $Pat
|
||||
$this.Organization = $Organization
|
||||
$this.Project = $Project
|
||||
}
|
||||
}
|
||||
|
||||
# Get the Component Governance data needed to connect to the API
|
||||
function Get-CgData {
|
||||
if($Script:cgData){return $Script:cgData}
|
||||
throw "First call Set-CgCredentials"
|
||||
}
|
||||
|
||||
# Get a Component Governance API URI
|
||||
function Get-Uri {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string]$PathPortion
|
||||
)
|
||||
$cgData = Get-CgData
|
||||
$baseUri = "https://governance.dev.azure.com/$($cgData.Organization)/$($cgData.Project)/_apis/componentgovernance/$PathPortion"
|
||||
Write-Verbose "uri: $baseUri" -Verbose
|
||||
return $baseUri
|
||||
}
|
||||
|
||||
# A class representing a Component Governance repository
|
||||
class CgRepository {
|
||||
#Json formatted summary information about this repository. Currently contains number of active nuget.config alerts.
|
||||
[Object] $additionalInformation
|
||||
|
||||
#The associations for this governed repository. For example, all service tree related entries.
|
||||
[Object] $associations
|
||||
|
||||
#Creator of the governed repository.
|
||||
[Object] $createdBy
|
||||
|
||||
[string] $createdDate
|
||||
|
||||
[int] $id
|
||||
|
||||
[string] $modifiedBy
|
||||
|
||||
[string] $modifiedDate
|
||||
|
||||
[string] $name
|
||||
|
||||
#The policies that are configured in the governed repository.
|
||||
[object[]] $policies
|
||||
|
||||
[object] $projectReference
|
||||
|
||||
[string] $repositoryMoniker
|
||||
|
||||
[object] $repositoryOptions
|
||||
|
||||
[object] $type
|
||||
|
||||
[string] $url
|
||||
|
||||
[object] $userRole
|
||||
}
|
||||
|
||||
# Gets a list of all repositories governed in the current project
|
||||
function Get-CgRepositories {
|
||||
$uri = Get-Uri -PathPortion "governedrepositories?api-version=6.1-preview.1"
|
||||
$cgData = Get-CgData
|
||||
[CgRepository[]] (Invoke-RestMethod -Uri $uri -Authentication Basic -Credential $cgData.Pat).value
|
||||
}
|
||||
|
||||
# Gets this PowerShell master repository
|
||||
Function Get-CgPsRepository {
|
||||
Get-CgRepositories | Where-Object {$_.name -eq 'PowerShell' -and $_.repositoryMoniker -notlike '*/*'}
|
||||
}
|
||||
|
||||
# Gets the Component Governance Snapshot Type (unique to each Pipeline and Job) in the repository
|
||||
function Get-CgSnapshotType {
|
||||
param(
|
||||
[CgRepository]
|
||||
$CgRepository
|
||||
)
|
||||
|
||||
$id = $CgRepository.Id
|
||||
$uri = Get-Uri -PathPortion "GovernedRepositories/$id/snapshottypes?api-version=6.1-preview.1"
|
||||
$cgData = Get-CgData
|
||||
(Invoke-RestMethod -Authentication Basic -Credential $cgData.Pat -Uri $uri).Value
|
||||
}
|
||||
|
||||
# Gets a Component Governance Notice for a given snapshot type
|
||||
function Get-CgNotice {
|
||||
param(
|
||||
[CgRepository]
|
||||
$CgRepository,
|
||||
[int]
|
||||
$SnapshotTypeId
|
||||
)
|
||||
|
||||
$id = $CgRepository.Id
|
||||
$uri = Get-Uri -PathPortion "GovernedRepositories/${id}/notice?snapshotTypeId=${SnapshotTypeId}&api-version=6.1-preview.1"
|
||||
$cgData = Get-CgData
|
||||
(Invoke-RestMethod -Authentication Basic -Credential $cgData.Pat -Uri $uri).content
|
||||
}
|
||||
|
||||
# Sets the Component Governance credentials used by other functions to connect to the API
|
||||
function Set-CgCredentials {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
[securestring] $Pat,
|
||||
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string] $Organization,
|
||||
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string] $Project
|
||||
)
|
||||
|
||||
$pscred = [PSCredential]::new("PAT",$Pat)
|
||||
$script:cgData = [CgData]::new($pscred, $Organization, $Project)
|
||||
}
|
||||
|
||||
Export-ModuleMember -Function @(
|
||||
'Get-CgRepositories'
|
||||
'Set-CgCredentials'
|
||||
'Get-CgRepository'
|
||||
'Get-CgPsRepository'
|
||||
'Get-CgSnapshotType'
|
||||
'Get-CgNotice'
|
||||
)
|
|
@ -189,7 +189,7 @@ function Get-DotnetUpdate {
|
|||
try {
|
||||
|
||||
try {
|
||||
$latestSDKVersionString = Invoke-RestMethod -Uri "http://aka.ms/dotnet/$channel/$quality/productVersion.txt" -ErrorAction Stop | ForEach-Object { $_.Trim() }
|
||||
$latestSDKVersionString = Invoke-RestMethod -Uri "http://aka.ms/dotnet/$channel/$quality/sdk-productVersion.txt" -ErrorAction Stop | ForEach-Object { $_.Trim() }
|
||||
$selectedQuality = $quality
|
||||
} catch {
|
||||
if ($_.exception.Response.StatusCode -eq 'NotFound') {
|
||||
|
@ -201,7 +201,7 @@ function Get-DotnetUpdate {
|
|||
|
||||
if (-not $latestSDKVersionString -or -not $latestSDKVersionString.StartsWith($sdkImageVersion)) {
|
||||
# we did not get a version number so fall back to daily
|
||||
$latestSDKVersionString = Invoke-RestMethod -Uri "http://aka.ms/dotnet/$channel/$qualityFallback/productVersion.txt" -ErrorAction Stop | ForEach-Object { $_.Trim() }
|
||||
$latestSDKVersionString = Invoke-RestMethod -Uri "http://aka.ms/dotnet/$channel/$qualityFallback/sdk-productVersion.txt" -ErrorAction Stop | ForEach-Object { $_.Trim() }
|
||||
$selectedQuality = $qualityFallback
|
||||
|
||||
if (-not $latestSDKVersionString.StartsWith($sdkImageVersion)) {
|
||||
|
@ -339,9 +339,6 @@ if ($dotnetUpdate.ShouldUpdate) {
|
|||
Start-PSBootstrap -Package
|
||||
Start-PSBuild -Clean -Configuration Release -CrossGen -InteractiveAuth:$InteractiveAuth
|
||||
|
||||
$publishPath = Split-Path (Get-PSOutput)
|
||||
Remove-Item -Path "$publishPath\*.pdb"
|
||||
|
||||
try {
|
||||
Start-PSPackage -Type msi -SkipReleaseChecks -InformationVariable wxsData
|
||||
} catch {
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
# this function wraps native command Execution
|
||||
# for more information, read https://mnaoumov.wordpress.com/2015/01/11/execution-of-external-commands-in-powershell-done-right/
|
||||
function script:Start-NativeExecution {
|
||||
param(
|
||||
[Alias('sb')]
|
||||
[Parameter(Mandatory=$true)]
|
||||
[scriptblock]$ScriptBlock,
|
||||
[switch]$IgnoreExitcode,
|
||||
[switch]$VerboseOutputOnError
|
||||
)
|
||||
|
||||
$backupEAP = $ErrorActionPreference
|
||||
$ErrorActionPreference = "Continue"
|
||||
Write-Verbose "Executing: $ScriptBlock"
|
||||
try {
|
||||
if ($VerboseOutputOnError.IsPresent) {
|
||||
$output = & $ScriptBlock 2>&1
|
||||
} else {
|
||||
& $ScriptBlock
|
||||
}
|
||||
|
||||
# note, if $ScriptBlock doesn't have a native invocation, $LASTEXITCODE will
|
||||
# point to the obsolete value
|
||||
if ($LASTEXITCODE -ne 0 -and -not $IgnoreExitcode) {
|
||||
if ($VerboseOutputOnError.IsPresent -and $output) {
|
||||
$output | Out-String | Write-Verbose -Verbose
|
||||
}
|
||||
|
||||
# Get caller location for easier debugging
|
||||
$caller = Get-PSCallStack -ErrorAction SilentlyContinue
|
||||
if ($caller) {
|
||||
$callerLocationParts = $caller[1].Location -split ":\s*line\s*"
|
||||
$callerFile = $callerLocationParts[0]
|
||||
$callerLine = $callerLocationParts[1]
|
||||
|
||||
$errorMessage = "Execution of {$ScriptBlock} by ${callerFile}: line $callerLine failed with exit code $LASTEXITCODE"
|
||||
throw $errorMessage
|
||||
}
|
||||
throw "Execution of {$ScriptBlock} failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
} finally {
|
||||
$ErrorActionPreference = $backupEAP
|
||||
}
|
||||
}
|
134
tools/ci.psm1
134
tools/ci.psm1
|
@ -99,7 +99,7 @@ function Invoke-CIBuild
|
|||
Start-PSBuild -Configuration 'CodeCoverage' -PSModuleRestore -CI -ReleaseTag $releaseTag
|
||||
}
|
||||
|
||||
Start-PSBuild -PSModuleRestore -Configuration 'Release' -CI -ReleaseTag $releaseTag
|
||||
Start-PSBuild -CrossGen -PSModuleRestore -Configuration 'Release' -CI -ReleaseTag $releaseTag
|
||||
Save-PSOptions
|
||||
|
||||
$options = (Get-PSOptions)
|
||||
|
@ -171,7 +171,6 @@ function Invoke-CIInstall
|
|||
}
|
||||
|
||||
Set-BuildVariable -Name TestPassed -Value False
|
||||
Write-Verbose -Verbose -Message "Calling Start-PSBootstrap from Invoke-CIInstall"
|
||||
Start-PSBootstrap
|
||||
}
|
||||
|
||||
|
@ -464,25 +463,27 @@ function Invoke-CIFinish
|
|||
$previewPrefix = $previewVersion[0]
|
||||
$previewLabel = $previewVersion[1].replace('.','')
|
||||
|
||||
if (Test-DailyBuild) {
|
||||
$previewLabel = "daily{0}" -f $previewLabel
|
||||
if(Test-DailyBuild)
|
||||
{
|
||||
$previewLabel= "daily{0}" -f $previewLabel
|
||||
}
|
||||
|
||||
$prereleaseIteration = (get-date).Day
|
||||
$preReleaseVersion = "$previewPrefix-$previewLabel.$prereleaseIteration"
|
||||
# Build clean before backing to remove files from testing
|
||||
Start-PSBuild -PSModuleRestore -Configuration 'Release' -ReleaseTag $preReleaseVersion -Clean -Runtime $Runtime -output $buildFolder -PSOptionsPath "${buildFolder}/psoptions.json"
|
||||
Start-PSBuild -CrossGen -PSModuleRestore -Configuration 'Release' -ReleaseTag $preReleaseVersion -Clean -Runtime $Runtime -output $buildFolder -PSOptionsPath "${buildFolder}/psoptions.json"
|
||||
$options = Get-PSOptions
|
||||
# Remove symbol files.
|
||||
$filter = Join-Path -Path (Split-Path $options.Output) -ChildPath '*.pdb'
|
||||
Write-Verbose "Removing symbol files from $filter" -Verbose
|
||||
Remove-Item $filter -Force -Recurse
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$releaseTag = Get-ReleaseTag
|
||||
$releaseTagParts = $releaseTag.split('.')
|
||||
$preReleaseVersion = $releaseTagParts[0]+ ".9.9"
|
||||
Write-Verbose "newPSReleaseTag: $preReleaseVersion" -Verbose
|
||||
Start-PSBuild -PSModuleRestore -Configuration 'Release' -ReleaseTag $preReleaseVersion -Clean -Runtime $Runtime -output $buildFolder -PSOptionsPath "${buildFolder}/psoptions.json"
|
||||
Start-PSBuild -CrossGen -PSModuleRestore -Configuration 'Release' -ReleaseTag $preReleaseVersion -Clean -Runtime $Runtime -output $buildFolder -PSOptionsPath "${buildFolder}/psoptions.json"
|
||||
$options = Get-PSOptions
|
||||
# Remove symbol files.
|
||||
$filter = Join-Path -Path (Split-Path $options.Output) -ChildPath '*.pdb'
|
||||
|
@ -495,81 +496,106 @@ function Invoke-CIFinish
|
|||
$vstsCommandString = "vso[task.setvariable variable=CI_FINISH_RELASETAG]$preReleaseVersion"
|
||||
Write-Verbose -Message "$vstsCommandString" -Verbose
|
||||
Write-Host -Object "##$vstsCommandString"
|
||||
|
||||
$armBuildFolder = "${env:SYSTEM_ARTIFACTSDIRECTORY}/releaseArm32"
|
||||
|
||||
# produce win-arm and win-arm64 packages if it is a daily build
|
||||
Start-PSBuild -Restore -Runtime win-arm -PSModuleRestore -Configuration 'Release' -ReleaseTag $releaseTag -output $armBuildFolder -PSOptionsPath "${armBuildFolder}-meta/psoptions.json" -Crossgen
|
||||
$options = Get-PSOptions
|
||||
# Remove symbol files.
|
||||
$filter = Join-Path -Path (Split-Path $options.Output) -ChildPath '*.pdb'
|
||||
Write-Verbose "Removing symbol files from $filter" -Verbose
|
||||
Remove-Item $filter -Force -Recurse
|
||||
|
||||
$armBuildFolder = "${env:SYSTEM_ARTIFACTSDIRECTORY}/releaseArm64"
|
||||
Start-PSBuild -Restore -Runtime win-arm64 -PSModuleRestore -Configuration 'Release' -ReleaseTag $releaseTag -output $armBuildFolder -PSOptionsPath "${armBuildFolder}-meta/psoptions.json" -Crossgen
|
||||
$options = Get-PSOptions
|
||||
# Remove symbol files.
|
||||
$filter = Join-Path -Path (Split-Path $options.Output) -ChildPath '*.pdb'
|
||||
Write-Verbose "Removing symbol files from $filter" -Verbose
|
||||
Remove-Item $filter -Force -Recurse
|
||||
}
|
||||
|
||||
|
||||
if ($Stage -contains "Package") {
|
||||
Restore-PSOptions -PSOptionsPath "${buildFolder}/psoptions.json"
|
||||
Restore-PSOptions -PSOptionsPath "${buildFolder}-meta/psoptions.json"
|
||||
$preReleaseVersion = $env:CI_FINISH_RELASETAG
|
||||
|
||||
# Build packages $preReleaseVersion = "$previewPrefix-$previewLabel.$prereleaseIteration"
|
||||
switch -regex ($Runtime){
|
||||
default {
|
||||
$runPackageTest = $true
|
||||
$packageTypes = 'msi', 'nupkg', 'zip', 'zip-pdb', 'msix'
|
||||
}
|
||||
'win-arm.*' {
|
||||
$runPackageTest = $false
|
||||
$packageTypes = 'zip', 'zip-pdb', 'msix'
|
||||
}
|
||||
}
|
||||
$packages = Start-PSPackage -Type $packageTypes -ReleaseTag $preReleaseVersion -SkipReleaseChecks -WindowsRuntime $Runtime
|
||||
$packages = Start-PSPackage -Type msi, nupkg, zip, zip-pdb -ReleaseTag $preReleaseVersion -SkipReleaseChecks -WindowsRuntime $Runtime
|
||||
|
||||
foreach ($package in $packages) {
|
||||
if (Test-Path $package -ErrorAction Ignore) {
|
||||
if (Test-Path $package -ErrorAction Ignore)
|
||||
{
|
||||
Write-Log "Package found: $package"
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Warning -Message "Package NOT found: $package"
|
||||
}
|
||||
|
||||
if ($package -is [string]) {
|
||||
if($package -is [string])
|
||||
{
|
||||
$null = $artifacts.Add($package)
|
||||
} elseif ($package -is [pscustomobject] -and $package.psobject.Properties['msi']) {
|
||||
}
|
||||
elseif($package -is [pscustomobject] -and $package.psobject.Properties['msi'])
|
||||
{
|
||||
$null = $artifacts.Add($package.msi)
|
||||
$null = $artifacts.Add($package.wixpdb)
|
||||
}
|
||||
}
|
||||
|
||||
if ($runPackageTest) {
|
||||
# the packaging tests find the MSI package using env:PSMsiX64Path
|
||||
$env:PSMsiX64Path = $artifacts | Where-Object { $_.EndsWith(".msi")}
|
||||
$architechture = $Runtime.Split('-')[1]
|
||||
$exePath = New-ExePackage -ProductVersion ($preReleaseVersion -replace '^v') -ProductTargetArchitecture $architechture -MsiLocationPath $env:PSMsiX64Path
|
||||
Write-Verbose "exe Path: $exePath" -Verbose
|
||||
$artifacts.Add($exePath)
|
||||
$env:PSExePath = $exePath
|
||||
$env:PSMsiChannel = $Channel
|
||||
$env:PSMsiRuntime = $Runtime
|
||||
# the packaging tests find the MSI package using env:PSMsiX64Path
|
||||
$env:PSMsiX64Path = $artifacts | Where-Object { $_.EndsWith(".msi")}
|
||||
$architechture = $Runtime.Split('-')[1]
|
||||
$exePath = New-ExePackage -ProductVersion ($preReleaseVersion -replace '^v') -ProductTargetArchitecture $architechture -MsiLocationPath $env:PSMsiX64Path
|
||||
Write-Verbose "exe Path: $exePath" -Verbose
|
||||
$artifacts.Add($exePath)
|
||||
$env:PSExePath = $exePath
|
||||
$env:PSMsiChannel = $Channel
|
||||
$env:PSMsiRuntime = $Runtime
|
||||
|
||||
# Install the latest Pester and import it
|
||||
$maximumPesterVersion = '4.99'
|
||||
Install-Module Pester -Force -SkipPublisherCheck -MaximumVersion $maximumPesterVersion
|
||||
Import-Module Pester -Force -MaximumVersion $maximumPesterVersion
|
||||
# Install the latest Pester and import it
|
||||
$maximumPesterVersion = '4.99'
|
||||
Install-Module Pester -Force -SkipPublisherCheck -MaximumVersion $maximumPesterVersion
|
||||
Import-Module Pester -Force -MaximumVersion $maximumPesterVersion
|
||||
|
||||
$testResultPath = Join-Path -Path $env:TEMP -ChildPath "win-package-$channel-$runtime.xml"
|
||||
$testResultPath = Join-Path -Path $env:TEMP -ChildPath "win-package-$channel-$runtime.xml"
|
||||
|
||||
# start the packaging tests and get the results
|
||||
$packagingTestResult = Invoke-Pester -Script (Join-Path $repoRoot '.\test\packaging\windows\') -PassThru -OutputFormat NUnitXml -OutputFile $testResultPath
|
||||
# start the packaging tests and get the results
|
||||
$packagingTestResult = Invoke-Pester -Script (Join-Path $repoRoot '.\test\packaging\windows\') -PassThru -OutputFormat NUnitXml -OutputFile $testResultPath
|
||||
|
||||
Publish-TestResults -Title "win-package-$channel-$runtime" -Path $testResultPath
|
||||
Publish-TestResults -Title "win-package-$channel-$runtime" -Path $testResultPath
|
||||
|
||||
# fail the CI job if the tests failed, or nothing passed
|
||||
if (-not $packagingTestResult -is [pscustomobject] -or $packagingTestResult.FailedCount -ne 0 -or $packagingTestResult.PassedCount -eq 0) {
|
||||
throw "Packaging tests failed ($($packagingTestResult.FailedCount) failed/$($packagingTestResult.PassedCount) passed)"
|
||||
}
|
||||
# fail the CI job if the tests failed, or nothing passed
|
||||
if(-not $packagingTestResult -is [pscustomobject] -or $packagingTestResult.FailedCount -ne 0 -or $packagingTestResult.PassedCount -eq 0)
|
||||
{
|
||||
throw "Packaging tests failed ($($packagingTestResult.FailedCount) failed/$($packagingTestResult.PassedCount) passed)"
|
||||
}
|
||||
|
||||
# only publish assembly nuget packages if it is a daily build and tests passed
|
||||
if (Test-DailyBuild) {
|
||||
if(Test-DailyBuild)
|
||||
{
|
||||
$nugetArtifacts = Get-ChildItem $PSScriptRoot\packaging\nugetOutput -ErrorAction SilentlyContinue -Filter *.nupkg | Select-Object -ExpandProperty FullName
|
||||
if ($nugetArtifacts) {
|
||||
if($nugetArtifacts)
|
||||
{
|
||||
$artifacts.AddRange(@($nugetArtifacts))
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
Get-Error -InputObject $_
|
||||
throw
|
||||
} finally {
|
||||
|
||||
# produce win-arm and win-arm64 packages if it is a daily build
|
||||
$armBuildFolder = "${env:SYSTEM_ARTIFACTSDIRECTORY}/releaseArm32"
|
||||
Restore-PSOptions -PSOptionsPath "${armBuildFolder}-meta/psoptions.json"
|
||||
$arm32Package = Start-PSPackage -Type zip -WindowsRuntime win-arm -ReleaseTag $releaseTag -SkipReleaseChecks
|
||||
$artifacts.Add($arm32Package)
|
||||
|
||||
$armBuildFolder = "${env:SYSTEM_ARTIFACTSDIRECTORY}/releaseArm64"
|
||||
Restore-PSOptions -PSOptionsPath "${armBuildFolder}-meta/psoptions.json"
|
||||
$arm64Package = Start-PSPackage -Type zip -WindowsRuntime win-arm64 -ReleaseTag $releaseTag -SkipReleaseChecks
|
||||
$artifacts.Add($arm64Package)
|
||||
}
|
||||
finally {
|
||||
$pushedAllArtifacts = $true
|
||||
|
||||
$artifacts | ForEach-Object {
|
||||
|
@ -586,6 +612,12 @@ function Invoke-CIFinish
|
|||
throw "Some artifacts did not exist!"
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Host -Foreground Red $_
|
||||
Write-Host -Foreground Red $_.ScriptStackTrace
|
||||
throw $_
|
||||
}
|
||||
}
|
||||
|
||||
# Bootstrap script for Linux and macOS
|
||||
|
|
|
@ -1,286 +0,0 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
# This script is used to completely rebuild the cgmanifgest.json file,
|
||||
# which is used to generate the notice file.
|
||||
# Requires the module dotnet.project.assets from the PowerShell Gallery authored by @TravisEz13
|
||||
|
||||
param(
|
||||
[switch] $Fix
|
||||
)
|
||||
|
||||
Import-Module dotnet.project.assets
|
||||
Import-Module "$PSScriptRoot\..\.github\workflows\GHWorkflowHelper" -Force
|
||||
. "$PSScriptRoot\..\tools\buildCommon\startNativeExecution.ps1"
|
||||
|
||||
$existingRegistrationTable = @{}
|
||||
$existingRegistrationsJson = Get-Content $PSScriptRoot\..\cgmanifest.json | ConvertFrom-Json -AsHashtable
|
||||
$existingRegistrationsJson.Registrations | ForEach-Object {
|
||||
$registration = [Registration]$_
|
||||
if ($registration.Component) {
|
||||
$name = $registration.Component.Name()
|
||||
$existingRegistrationTable.Add($name, $registration)
|
||||
}
|
||||
}
|
||||
|
||||
Class Registration {
|
||||
[Component]$Component
|
||||
[bool]$DevelopmentDependency
|
||||
}
|
||||
|
||||
Class Component {
|
||||
[ValidateSet("nuget")]
|
||||
[String] $Type
|
||||
[Nuget]$Nuget
|
||||
|
||||
[string]ToString() {
|
||||
$message = "Type: $($this.Type)"
|
||||
if ($this.Type -eq "nuget") {
|
||||
$message += "; $($this.Nuget)"
|
||||
}
|
||||
return $message
|
||||
}
|
||||
|
||||
[string]Name() {
|
||||
switch ($this.Type) {
|
||||
"nuget" {
|
||||
return $($this.Nuget.Name)
|
||||
}
|
||||
default {
|
||||
throw "Unknown component type: $($this.Type)"
|
||||
}
|
||||
}
|
||||
throw "How did we get here?!?"
|
||||
}
|
||||
|
||||
[string]Version() {
|
||||
switch ($this.Type) {
|
||||
"nuget" {
|
||||
return $($this.Nuget.Version)
|
||||
}
|
||||
default {
|
||||
throw "Unknown component type: $($this.Type)"
|
||||
}
|
||||
}
|
||||
throw "How did we get here?!?"
|
||||
}
|
||||
}
|
||||
|
||||
Class Nuget {
|
||||
[string]$Name
|
||||
[string]$Version
|
||||
|
||||
[string]ToString() {
|
||||
return "$($this.Name) - $($this.Version)"
|
||||
}
|
||||
}
|
||||
|
||||
$winDesktopSdk = 'Microsoft.NET.Sdk.WindowsDesktop'
|
||||
if (!$IsWindows) {
|
||||
$winDesktopSdk = 'Microsoft.NET.Sdk'
|
||||
Write-Warning "Always using $winDesktopSdk since this is not windows!!!"
|
||||
}
|
||||
|
||||
function New-NugetComponent {
|
||||
param(
|
||||
[string]$name,
|
||||
[string]$version,
|
||||
[switch]$DevelopmentDependency
|
||||
)
|
||||
|
||||
$nuget = [Nuget]@{
|
||||
Name = $name
|
||||
Version = $version
|
||||
}
|
||||
$Component = [Component]@{
|
||||
Type = "nuget"
|
||||
Nuget = $nuget
|
||||
}
|
||||
|
||||
$registration = [Registration]@{
|
||||
Component = $Component
|
||||
DevelopmentDependency = $DevelopmentDependency
|
||||
}
|
||||
|
||||
return $registration
|
||||
}
|
||||
|
||||
$nugetPublicVersionCache = [System.Collections.Generic.Dictionary[string, string]]::new()
|
||||
function Get-NuGetPublicVersion {
|
||||
param(
|
||||
[string]$Name,
|
||||
[string]$Version
|
||||
)
|
||||
|
||||
if($nugetPublicVersionCache.ContainsKey($Name)) {
|
||||
return $nugetPublicVersionCache[$Name]
|
||||
}
|
||||
|
||||
try {
|
||||
[System.Management.Automation.SemanticVersion]$desiredVersion = $Version
|
||||
} catch {
|
||||
[Version]$desiredVersion = $Version
|
||||
}
|
||||
|
||||
$publicVersion = $null
|
||||
$publicVersion = Find-Package -Name $Name -AllowPrereleaseVersions -source nuget.org -AllVersions -ErrorAction SilentlyContinue | ForEach-Object {
|
||||
try {
|
||||
$packageVersion = [System.Management.Automation.SemanticVersion]$_.Version
|
||||
} catch {
|
||||
# Fall back to using [version] if it is not a semantic version
|
||||
$packageVersion = $_.Version
|
||||
}
|
||||
|
||||
$_ | Add-Member -Name SemVer -MemberType NoteProperty -Value $packageVersion -PassThru
|
||||
} | Where-Object { $_.SemVer -le $desiredVersion } | Sort-Object -Property semver -Descending | Select-Object -First 1 -ExpandProperty Version
|
||||
|
||||
if(!$publicVersion) {
|
||||
Write-Warning "No public version found for $Name, using $Version"
|
||||
$publicVersion = $Version
|
||||
}
|
||||
|
||||
if(!$nugetPublicVersionCache.ContainsKey($Name)) {
|
||||
$nugetPublicVersionCache.Add($Name, $publicVersion)
|
||||
}
|
||||
|
||||
return $publicVersion
|
||||
}
|
||||
|
||||
function Get-CGRegistrations {
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
[ValidateSet(
|
||||
"alpine-x64",
|
||||
"linux-arm",
|
||||
"linux-arm64",
|
||||
"linux-x64",
|
||||
"osx-arm64",
|
||||
"osx-x64",
|
||||
"win-arm",
|
||||
"win-arm64",
|
||||
"win7-x64",
|
||||
"win7-x86",
|
||||
"modules")]
|
||||
[string]$Runtime,
|
||||
|
||||
[Parameter(Mandatory)]
|
||||
[System.Collections.Generic.Dictionary[string, Registration]] $RegistrationTable
|
||||
)
|
||||
|
||||
$registrationChanged = $false
|
||||
|
||||
$dotnetTargetName = 'net6.0'
|
||||
$dotnetTargetNameWin7 = 'net6.0-windows7.0'
|
||||
$unixProjectName = 'powershell-unix'
|
||||
$windowsProjectName = 'powershell-win-core'
|
||||
$actualRuntime = $Runtime
|
||||
|
||||
switch -regex ($Runtime) {
|
||||
"alpine-.*" {
|
||||
$folder = $unixProjectName
|
||||
$target = "$dotnetTargetName|$Runtime"
|
||||
}
|
||||
"linux-.*" {
|
||||
$folder = $unixProjectName
|
||||
$target = "$dotnetTargetName|$Runtime"
|
||||
}
|
||||
"osx-.*" {
|
||||
$folder = $unixProjectName
|
||||
$target = "$dotnetTargetName|$Runtime"
|
||||
}
|
||||
"win7-.*" {
|
||||
$sdkToUse = $winDesktopSdk
|
||||
$folder = $windowsProjectName
|
||||
$target = "$dotnetTargetNameWin7|$Runtime"
|
||||
}
|
||||
"win-.*" {
|
||||
$folder = $windowsProjectName
|
||||
$target = "$dotnetTargetNameWin7|$Runtime"
|
||||
}
|
||||
"modules" {
|
||||
$folder = "modules"
|
||||
$actualRuntime = 'linux-x64'
|
||||
$target = "$dotnetTargetName|$actualRuntime"
|
||||
}
|
||||
Default {
|
||||
throw "Invalid runtime name: $Runtime"
|
||||
}
|
||||
}
|
||||
|
||||
Write-Verbose "Getting registrations for $folder - $actualRuntime ..." -Verbose
|
||||
Get-PSDrive -Name $folder -ErrorAction Ignore | Remove-PSDrive
|
||||
Push-Location $PSScriptRoot\..\src\$folder
|
||||
try {
|
||||
Start-NativeExecution -VerboseOutputOnError -sb {
|
||||
dotnet restore --runtime $actualRuntime "/property:SDKToUse=$sdkToUse"
|
||||
}
|
||||
$null = New-PADrive -Path $PSScriptRoot\..\src\$folder\obj\project.assets.json -Name $folder
|
||||
try {
|
||||
$targets = Get-ChildItem -Path "${folder}:/targets/$target" -ErrorAction Stop | Where-Object { $_.Type -eq 'package' } | select-object -ExpandProperty name
|
||||
} catch {
|
||||
Get-ChildItem -Path "${folder}:/targets" | Out-String | Write-Verbose -Verbose
|
||||
throw
|
||||
}
|
||||
} finally {
|
||||
Pop-Location
|
||||
Get-PSDrive -Name $folder -ErrorAction Ignore | Remove-PSDrive
|
||||
}
|
||||
|
||||
$targets | ForEach-Object {
|
||||
$target = $_
|
||||
$parts = ($target -split '\|')
|
||||
$name = $parts[0]
|
||||
$targetVersion = $parts[1]
|
||||
$publicVersion = Get-NuGetPublicVersion -Name $name -Version $targetVersion
|
||||
|
||||
# Add the registration to the cgmanifest if the TPN does not contain the name of the target OR
|
||||
# the exisitng CG contains the registration, because if the existing CG contains the registration,
|
||||
# that might be the only reason it is in the TPN.
|
||||
if (!$RegistrationTable.ContainsKey($target)) {
|
||||
$DevelopmentDependency = $false
|
||||
if (!$existingRegistrationTable.ContainsKey($name) -or $existingRegistrationTable.$name.Component.Version() -ne $publicVersion) {
|
||||
$registrationChanged = $true
|
||||
}
|
||||
if ($existingRegistrationTable.ContainsKey($name) -and $existingRegistrationTable.$name.DevelopmentDependency) {
|
||||
$DevelopmentDependency = $true
|
||||
}
|
||||
|
||||
$registration = New-NugetComponent -Name $name -Version $publicVersion -DevelopmentDependency:$DevelopmentDependency
|
||||
$RegistrationTable.Add($target, $registration)
|
||||
}
|
||||
}
|
||||
|
||||
return $registrationChanged
|
||||
}
|
||||
|
||||
$registrations = [System.Collections.Generic.Dictionary[string, Registration]]::new()
|
||||
$lastCount = 0
|
||||
$registrationChanged = $false
|
||||
foreach ($runtime in "win7-x64", "linux-x64", "osx-x64", "alpine-x64", "win-arm", "linux-arm", "linux-arm64", "osx-arm64", "win-arm64", "win7-x86") {
|
||||
$registrationChanged = (Get-CGRegistrations -Runtime $runtime -RegistrationTable $registrations) -or $registrationChanged
|
||||
$count = $registrations.Count
|
||||
$newCount = $count - $lastCount
|
||||
$lastCount = $count
|
||||
Write-Verbose "$newCount new registrations, $count total..." -Verbose
|
||||
}
|
||||
|
||||
$newRegistrations = $registrations.Keys | Sort-Object | ForEach-Object { $registrations[$_] }
|
||||
|
||||
$count = $newRegistrations.Count
|
||||
$newJson = @{Registrations = $newRegistrations } | ConvertTo-Json -depth 99
|
||||
if ($Fix -and $registrationChanged) {
|
||||
$cgManifestPath = (Resolve-Path -Path $PSScriptRoot\..\cgmanifest.json).ProviderPath
|
||||
$newJson | Set-Content $cgManifestPath
|
||||
Set-GWVariable -Name CGMANIFEST_PATH -Value $cgManifestPath
|
||||
}
|
||||
|
||||
if (!$Fix -and $registrationChanged) {
|
||||
$temp = Get-GWTempPath
|
||||
|
||||
$tempJson = Join-Path -Path $temp -ChildPath "cgmanifest$((Get-Date).ToString('yyyMMddHHmm')).json"
|
||||
$newJson | Set-Content $tempJson -Encoding utf8NoBOM
|
||||
Set-GWVariable -Name CGMANIFEST_PATH -Value $tempJson
|
||||
throw "cgmanifest is out of date. run ./tools/findMissingNotices.ps1 -Fix. Generated cgmanifest is here: $tempJson"
|
||||
}
|
||||
|
||||
Write-Verbose "$count registrations created!" -Verbose
|
|
@ -1,10 +1,9 @@
|
|||
{
|
||||
"StableReleaseTag": "v7.2.0",
|
||||
"PreviewReleaseTag": "v7.2.0-rc.1",
|
||||
"StableReleaseTag": "v7.1.5",
|
||||
"PreviewReleaseTag": "v7.2.0-preview.10",
|
||||
"ServicingReleaseTag": "v7.0.8",
|
||||
"ReleaseTag": "v7.2.0",
|
||||
"LTSReleaseTag" : ["v7.2.0", "v7.0.8"],
|
||||
"NextReleaseTag": "v7.3.0-preview.1",
|
||||
"LTSRelease": { "Latest": false, "Package": false },
|
||||
"StableRelease": { "Latest": false, "Package": false }
|
||||
"ReleaseTag": "v7.1.5",
|
||||
"LTSReleaseTag" : ["v7.0.8"],
|
||||
"NextReleaseTag": "v7.2.0-preview.11",
|
||||
"LTSRelease": false
|
||||
}
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
{
|
||||
"Packages" : [
|
||||
{
|
||||
"url": "microsoft-centos8-prod",
|
||||
"distribution" : ["centos"],
|
||||
"PackageFormat" : "PACKAGE_NAME-POWERSHELL_RELEASE-1.rh.x86_64.rpm"
|
||||
},
|
||||
{
|
||||
"url": "microsoft-rhel8.0-prod",
|
||||
"distribution" : ["trusty"],
|
||||
"PackageFormat" : "PACKAGE_NAME-POWERSHELL_RELEASE-1.rh.x86_64.rpm"
|
||||
},
|
||||
{
|
||||
"url": "microsoft-rhel7.3-prod",
|
||||
"distribution" : ["trusty"],
|
||||
"PackageFormat" : "PACKAGE_NAME-POWERSHELL_RELEASE-1.rh.x86_64.rpm"
|
||||
},
|
||||
{
|
||||
"distribution" : ["stretch"],
|
||||
"PackageFormat" : "PACKAGE_NAME_POWERSHELL_RELEASE-1.deb_amd64.deb"
|
||||
},
|
||||
{
|
||||
"distribution" : ["buster"],
|
||||
"PackageFormat" : "PACKAGE_NAME_POWERSHELL_RELEASE-1.deb_amd64.deb"
|
||||
},
|
||||
{
|
||||
"distribution" : ["bionic"],
|
||||
"PackageFormat" : "PACKAGE_NAME_POWERSHELL_RELEASE-1.deb_amd64.deb"
|
||||
},
|
||||
{
|
||||
"distribution": ["focal"],
|
||||
"PackageFormat": "PACKAGE_NAME_POWERSHELL_RELEASE-1.deb_amd64.deb"
|
||||
},
|
||||
{
|
||||
"distribution": ["xenial"],
|
||||
"PackageFormat": "PACKAGE_NAME_POWERSHELL_RELEASE-1.deb_amd64.deb"
|
||||
},
|
||||
{
|
||||
"distribution": ["bullseye"],
|
||||
"PackageFormat": "PACKAGE_NAME_POWERSHELL_RELEASE-1.deb_amd64.deb"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -117,6 +117,17 @@ function Start-PSPackage {
|
|||
$Script:Options = Get-PSOptions
|
||||
$actualParams = @()
|
||||
|
||||
$crossGenCorrect = $false
|
||||
if ($Runtime -match "arm" -or $Type -eq 'min-size') {
|
||||
## crossgen doesn't support arm32/64;
|
||||
## For the min-size package, we intentionally avoid crossgen.
|
||||
$crossGenCorrect = $true
|
||||
}
|
||||
elseif ($Script:Options.CrossGen) {
|
||||
$actualParams += '-CrossGen'
|
||||
$crossGenCorrect = $true
|
||||
}
|
||||
|
||||
$PSModuleRestoreCorrect = $false
|
||||
|
||||
# Require PSModuleRestore for packaging without symbols
|
||||
|
@ -133,13 +144,14 @@ function Start-PSPackage {
|
|||
}
|
||||
|
||||
$precheckFailed = if ($Type -like 'fxdependent*' -or $Type -eq 'tar-alpine') {
|
||||
## We do not check on runtime for framework dependent package.
|
||||
## We do not check for runtime and crossgen for framework dependent package.
|
||||
-not $Script:Options -or ## Start-PSBuild hasn't been executed yet
|
||||
-not $PSModuleRestoreCorrect -or ## Last build didn't specify '-PSModuleRestore' correctly
|
||||
$Script:Options.Configuration -ne $Configuration -or ## Last build was with configuration other than 'Release'
|
||||
$Script:Options.Framework -ne $script:netCoreRuntime ## Last build wasn't for CoreCLR
|
||||
} else {
|
||||
-not $Script:Options -or ## Start-PSBuild hasn't been executed yet
|
||||
-not $crossGenCorrect -or ## Last build didn't specify '-CrossGen' correctly
|
||||
-not $PSModuleRestoreCorrect -or ## Last build didn't specify '-PSModuleRestore' correctly
|
||||
$Script:Options.Runtime -ne $Runtime -or ## Last build wasn't for the required RID
|
||||
$Script:Options.Configuration -ne $Configuration -or ## Last build was with configuration other than 'Release'
|
||||
|
@ -159,8 +171,14 @@ function Start-PSPackage {
|
|||
# also ensure `Start-PSPackage` does what the user asks/expects, because once packages
|
||||
# are generated, it'll be hard to verify if they were built from the correct content.
|
||||
|
||||
|
||||
$params = @('-Clean')
|
||||
|
||||
# CrossGen cannot be done for framework dependent package as it is runtime agnostic.
|
||||
if ($Type -notlike 'fxdependent*') {
|
||||
$params += '-CrossGen'
|
||||
}
|
||||
|
||||
if (!$IncludeSymbols.IsPresent) {
|
||||
$params += '-PSModuleRestore'
|
||||
}
|
||||
|
@ -207,22 +225,6 @@ function Start-PSPackage {
|
|||
# Copy the default.help.txt so it's part of the package
|
||||
Copy-Item "$RepoRoot/assets/default.help.txt" -Destination "$Source/en-US" -Force
|
||||
|
||||
if (-not $SkipGenerateReleaseFiles -and -not $env:TF_BUILD) {
|
||||
# Make sure psoptions.json file exists so appropriate files.wsx is generated
|
||||
$psOptionsPath = (Join-Path -Path $Source "psoptions.json")
|
||||
if (-not (Test-Path -Path $psOptionsPath)) {
|
||||
$createdOptionsFile = New-Item -Path $psOptionsPath -Force
|
||||
Write-Verbose -Verbose "Created psoptions file: $createdOptionsFile"
|
||||
}
|
||||
|
||||
# Make sure _manifest\spdx_2.2\manifest.spdx.json file exists so appropriate files.wxs is generated
|
||||
$manifestSpdxPath = (Join-Path -Path $Source "_manifest\spdx_2.2\manifest.spdx.json")
|
||||
if (-not (Test-Path -Path $manifestSpdxPath)) {
|
||||
$createdSpdxPath = New-Item -Path $manifestSpdxPath -Force
|
||||
Write-Verbose -Verbose "Created manifest.spdx.json file: $createdSpdxPath"
|
||||
}
|
||||
}
|
||||
|
||||
# If building a symbols package, we add a zip of the parent to publish
|
||||
if ($IncludeSymbols.IsPresent)
|
||||
{
|
||||
|
@ -1224,17 +1226,15 @@ function Get-FpmArguments
|
|||
"--maintainer", "PowerShell Team <PowerShellTeam@hotmail.com>",
|
||||
"--vendor", "Microsoft Corporation",
|
||||
"--url", "https://microsoft.com/powershell",
|
||||
"--license", "MIT License",
|
||||
"--description", $Description,
|
||||
"--category", "shells",
|
||||
"-t", $Type,
|
||||
"-s", "dir"
|
||||
)
|
||||
if ($Distribution -eq 'rh') {
|
||||
if ($Environment.IsRedHatFamily) {
|
||||
$Arguments += @("--rpm-dist", $Distribution)
|
||||
$Arguments += @("--rpm-os", "linux")
|
||||
$Arguments += @("--license", "MIT")
|
||||
} else {
|
||||
$Arguments += @("--license", "MIT License")
|
||||
}
|
||||
|
||||
if ($Environment.IsMacOS) {
|
||||
|
@ -1349,7 +1349,7 @@ function New-AfterScripts
|
|||
|
||||
Write-Verbose -Message "AfterScript Distribution: $Distribution" -Verbose
|
||||
|
||||
if ($Distribution -eq 'rh') {
|
||||
if ($Environment.IsRedHatFamily) {
|
||||
$AfterInstallScript = (Join-Path $env:HOME $([System.IO.Path]::GetRandomFileName()))
|
||||
$AfterRemoveScript = (Join-Path $env:HOME $([System.IO.Path]::GetRandomFileName()))
|
||||
$packagingStrings.RedHatAfterInstallScript -f "$Link", $Destination | Out-File -FilePath $AfterInstallScript -Encoding ascii
|
||||
|
@ -3096,7 +3096,7 @@ function Get-WindowsNames {
|
|||
Write-Verbose -Message "Getting Windows Names for ProductName: $ProductName; ProductNameSuffix: $ProductNameSuffix; ProductVersion: $ProductVersion" -Verbose
|
||||
|
||||
$ProductSemanticVersion = Get-PackageSemanticVersion -Version $ProductVersion
|
||||
$ProductVersion = Get-PackageVersionAsMajorMinorBuildRevision -Version $ProductVersion -IncrementBuildNumber
|
||||
$ProductVersion = Get-PackageVersionAsMajorMinorBuildRevision -Version $ProductVersion
|
||||
|
||||
$productVersionWithName = $ProductName + '_' + $ProductVersion
|
||||
$productSemanticVersionWithName = $ProductName + '-' + $ProductSemanticVersion
|
||||
|
@ -3748,9 +3748,8 @@ function Get-PackageVersionAsMajorMinorBuildRevision
|
|||
# Version of the Package
|
||||
[Parameter(Mandatory = $true)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string] $Version,
|
||||
[switch] $IncrementBuildNumber
|
||||
)
|
||||
[string] $Version
|
||||
)
|
||||
|
||||
Write-Verbose "Extract the version in the form of major.minor[.build[.revision]] for $Version"
|
||||
$packageVersionTokens = $Version.Split('-')
|
||||
|
@ -3771,10 +3770,6 @@ function Get-PackageVersionAsMajorMinorBuildRevision
|
|||
$packageBuildTokens = $packageBuildTokens.Substring(0,4)
|
||||
}
|
||||
|
||||
if ($packageVersionTokens[1] -match 'rc' -and $IncrementBuildNumber) {
|
||||
$packageBuildTokens = [int]$packageBuildTokens + 100
|
||||
}
|
||||
|
||||
$packageVersion = $packageVersion + '.' + $packageBuildTokens
|
||||
}
|
||||
else
|
||||
|
@ -3887,16 +3882,8 @@ function New-GlobalToolNupkg
|
|||
|
||||
$packageInfo = @()
|
||||
|
||||
$libCryptoPath = Join-Path $LinuxBinPath 'libcrypto.so.1.0.0'
|
||||
$libSSLPath = Join-Path $LinuxBinPath 'libssl.so.1.0.0'
|
||||
|
||||
if (Test-Path $libCryptoPath) {
|
||||
Remove-Item -Path $libCryptoPath -Verbose -Force
|
||||
}
|
||||
|
||||
if (Test-Path $libSSLPath) {
|
||||
Remove-Item -Path $libSSLPath -Verbose -Force
|
||||
}
|
||||
Remove-Item -Path (Join-Path $LinuxBinPath 'libcrypto.so.1.0.0') -Verbose -Force -Recurse
|
||||
Remove-Item -Path (Join-Path $LinuxBinPath 'libssl.so.1.0.0') -Verbose -Force -Recurse
|
||||
|
||||
## Remove unnecessary xml files
|
||||
Get-ChildItem -Path $LinuxBinPath, $WindowsBinPath, $WindowsDesktopBinPath -Filter *.xml | Remove-Item -Verbose
|
||||
|
@ -4142,6 +4129,9 @@ function Invoke-AzDevOpsLinuxPackageBuild {
|
|||
# We are cross compiling, so we can't generate experimental features
|
||||
$buildParams.Add("SkipExperimentalFeatureGeneration", $true)
|
||||
}
|
||||
default {
|
||||
$buildParams.Add("Crossgen", $true)
|
||||
}
|
||||
}
|
||||
|
||||
$buildFolder = "${env:SYSTEM_ARTIFACTSDIRECTORY}/${mainLinuxBuildFolder}"
|
||||
|
@ -4161,6 +4151,7 @@ function Invoke-AzDevOpsLinuxPackageBuild {
|
|||
Remove-Item -Path $binDir -Recurse -Force
|
||||
}
|
||||
|
||||
$buildParams['Crossgen'] = $false
|
||||
$buildParams['ForMinimalSize'] = $true
|
||||
$buildFolder = "${env:SYSTEM_ARTIFACTSDIRECTORY}/${minSizeLinuxBuildFolder}"
|
||||
Start-PSBuild -Clean @buildParams @releaseTagParam -Output $buildFolder -PSOptionsPath "${buildFolder}-meta/psoptions.json"
|
||||
|
@ -4215,7 +4206,7 @@ function Test-PackageManifest {
|
|||
}
|
||||
|
||||
Process {
|
||||
Write-Verbose "Processing $($man.files.count) files..." -verbose
|
||||
Write-Verbose "Processing $($man.files) files..." -verbose
|
||||
$man.files | ForEach-Object {
|
||||
$filePath = Join-Path $PackagePath -childPath $_.fileName
|
||||
$checksumObj = $_.checksums | Where-Object {$_.algorithm -eq 'sha256'}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue