Skip to content

Commit 6e6c8d0

Browse files
Merge pull request #139 from max-ieremenko/release/3.10.0
release 3.10.0
2 parents d2513f1 + 3a309c6 commit 6e6c8d0

File tree

261 files changed

+1521
-3021
lines changed

Some content is hidden

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

261 files changed

+1521
-3021
lines changed

Build/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ build-locally.ps1 is designed to run on windows. To run CI build locally
88

99
- install dependencies
1010

11-
[net8.0 sdk](https://dotnet.microsoft.com/download/dotnet/8.0),
11+
[net10.0 sdk](https://dotnet.microsoft.com/download/dotnet/10.0),
1212
[InvokeBuild](https://www.powershellgallery.com/packages/InvokeBuild)
1313

1414
``` powershell

Build/build-ci.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Requires -Version "7.0"
2-
#Requires -Modules @{ ModuleName="InvokeBuild"; ModuleVersion="5.14.18" }
2+
#Requires -Modules @{ ModuleName="InvokeBuild"; ModuleVersion="5.14.22" }
33

44
[CmdletBinding()]
55
param (

Build/build-locally.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Requires -Version "7.0"
2-
#Requires -Modules @{ ModuleName="InvokeBuild"; ModuleVersion="5.14.18" }
2+
#Requires -Modules @{ ModuleName="InvokeBuild"; ModuleVersion="5.14.22" }
33

44
$ErrorActionPreference = 'Stop'
55
Set-StrictMode -Version Latest

Build/build-tasks.ps1

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ param (
55
$GithubToken
66
)
77

8-
task LocalBuild Initialize, Clean, CiBuild, PsCoreTest, UpdateExamples
8+
task LocalBuild Initialize, Clean, CiBuild, PsCoreTest, ToolTest, UpdateExamples
99
task CiBuild Build, ThirdPartyNotices, UnitTest, Pack
1010

1111
task Pack PackGlobalTool, PackPowerShellModule, PackManualDownload, PackTest
@@ -17,7 +17,7 @@ Enter-Build {
1717
bin = [System.IO.Path]::GetFullPath((Join-Path $PSScriptRoot '../Sources/bin'))
1818
repository = [System.IO.Path]::GetFullPath((Join-Path $PSScriptRoot '../ThirdPartyLibraries'))
1919
examples = [System.IO.Path]::GetFullPath((Join-Path $PSScriptRoot '../Examples'))
20-
frameworks = 'net8.0', 'net9.0'
20+
frameworks = 'net8.0', 'net9.0', 'net10.0'
2121
version = $(
2222
$buildProps = [System.IO.Path]::GetFullPath((Join-Path $PSScriptRoot '../Sources/Directory.Build.props'))
2323
$packageVersion = (Select-Xml -Path $buildProps -XPath 'Project/PropertyGroup/DefaultPackageVersion').Node.InnerText
@@ -160,4 +160,14 @@ task UpdateExamples {
160160
}
161161

162162
Build-Parallel $builds -ShowParameter ExamplePath -MaximumBuilds 1
163+
}
164+
165+
task ToolTest {
166+
$builds = @()
167+
foreach ($framework in $settings.frameworks) {
168+
$builds += @{ File = 'tasks/tool-test.ps1'; BinPath = $settings.output; Framework = $framework; ToolType = 'cmd'; ToolVersion = $settings.version }
169+
$builds += @{ File = 'tasks/tool-test.ps1'; BinPath = $settings.output; Framework = $framework; ToolType = 'sdk'; ToolVersion = $settings.version }
170+
}
171+
172+
Build-Parallel $builds -ShowParameter Framework, ToolType -MaximumBuilds 3
163173
}

Build/install-dependencies.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ $ErrorActionPreference = 'Stop'
1515

1616
if (-not $List -or ('.net' -in $List)) {
1717
$install = Join-Path $PSScriptRoot 'scripts/Install-DotNet.ps1'
18-
& $install '8.0.403'
18+
& $install '8.0.414'
19+
& $install '9.0.305'
1920
& $install (Get-Content -Raw (Join-Path $PSScriptRoot '../Sources/global.json') | ConvertFrom-Json).sdk.version
2021
}
2122

Build/scripts/Test-CmdTool.ps1

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[CmdletBinding()]
2+
param (
3+
[Parameter(Mandatory = $true)]
4+
[ValidateScript({ Test-Path $_ })]
5+
[string]
6+
$Path
7+
)
8+
9+
$ErrorActionPreference = 'Stop'
10+
$ProgressPreference = 'SilentlyContinue'
11+
Set-StrictMode -Version Latest
12+
13+
$tmp = 'ThirdPartyLibraries'
14+
Expand-Archive -Path $Path -DestinationPath $tmp
15+
16+
dotnet "$tmp/ThirdPartyLibraries.dll"
17+
if ($LASTEXITCODE) {
18+
throw 'dotnet ThirdPartyLibraries.dll failed.'
19+
}

Build/scripts/Test-SdkTool.ps1

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[CmdletBinding()]
2+
param (
3+
[Parameter(Mandatory = $true)]
4+
[ValidateScript({ Test-Path $_ })]
5+
[string]
6+
$Source,
7+
8+
[Parameter(Mandatory)]
9+
[string]
10+
$Version
11+
)
12+
13+
$ErrorActionPreference = 'Stop'
14+
$ProgressPreference = 'SilentlyContinue'
15+
Set-StrictMode -Version Latest
16+
17+
dotnet tool install `
18+
--local `
19+
--create-manifest-if-needed `
20+
--version $Version `
21+
--add-source $Source `
22+
--verbosity quiet `
23+
ThirdPartyLibraries.GlobalTool
24+
if ($LASTEXITCODE) {
25+
throw 'dotnet tool install failed.'
26+
}
27+
28+
dotnet ThirdPartyLibraries
29+
if ($LASTEXITCODE) {
30+
throw 'dotnet ThirdPartyLibraries failed.'
31+
}

Build/tasks/pack-manual-download.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ param(
1010
$Version,
1111

1212
[Parameter(Mandatory = $true)]
13-
[ValidateSet('net8.0', 'net9.0')]
13+
[ValidateSet('net8.0', 'net9.0', 'net10.0')]
1414
[string]
1515
$Framework,
1616

Build/tasks/tool-test.ps1

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
[CmdletBinding()]
2+
param (
3+
[Parameter(Mandatory)]
4+
[ValidateScript({ Test-Path $_ })]
5+
[string]
6+
$BinPath,
7+
8+
[Parameter(Mandatory)]
9+
[ValidateSet('net8.0', 'net9.0', 'net10.0')]
10+
[string]
11+
$Framework,
12+
13+
[Parameter(Mandatory)]
14+
[ValidateSet('sdk', 'cmd')]
15+
[string]
16+
$ToolType,
17+
18+
[Parameter(Mandatory)]
19+
[string]
20+
$ToolVersion
21+
)
22+
23+
task . Pull, TestDotNet, TestCmd
24+
25+
Enter-Build {
26+
$sdkImage = $(
27+
$version = $Framework.TrimStart('net')
28+
"mcr.microsoft.com/dotnet/sdk:$version"
29+
)
30+
}
31+
32+
task Pull {
33+
exec {
34+
docker pull --quiet $sdkImage
35+
}
36+
}
37+
38+
task TestDotNet -If ($ToolType -eq 'sdk') {
39+
$scripts = Join-Path $PSScriptRoot '../scripts'
40+
41+
exec {
42+
docker run `
43+
-it `
44+
--rm `
45+
--entrypoint pwsh `
46+
-v "$($scripts):/app/scripts" `
47+
-v "$($BinPath):/app/bin" `
48+
--workdir '/tmp' `
49+
$sdkImage `
50+
'/app/scripts/Test-SdkTool.ps1' `
51+
-Version $ToolVersion `
52+
-Source '/app/bin'
53+
}
54+
}
55+
56+
task TestCmd -If ($ToolType -eq 'cmd') {
57+
$scripts = Join-Path $PSScriptRoot '../scripts'
58+
59+
exec {
60+
docker run `
61+
-it `
62+
--rm `
63+
--entrypoint pwsh `
64+
-v "$($scripts):/app/scripts" `
65+
-v "$($BinPath):/app/bin" `
66+
--workdir '/tmp' `
67+
$sdkImage `
68+
'/app/scripts/Test-CmdTool.ps1' `
69+
-Path "/app/bin/ThirdPartyLibraries.$ToolVersion-$Framework.zip"
70+
}
71+
}

Build/tasks/unit-test.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ param (
66
$BinPath,
77

88
[Parameter(Mandatory = $true)]
9-
[ValidateSet('net8.0', 'net9.0')]
9+
[ValidateSet('net8.0', 'net9.0', 'net10.0')]
1010
[string]
1111
$Framework
1212
)

0 commit comments

Comments
 (0)