Skip to content

Commit 8bec505

Browse files
target framework net7.0
target framework net7.0
2 parents 6c09278 + 748f4fc commit 8bec505

143 files changed

Lines changed: 343 additions & 131 deletions

File tree

Some content is hidden

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

Build/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
build.ps1 is designed to run on windows
44

55
- PowerShell Desktop 5.1
6+
- PowerShell [7.3.0](https://github.com/PowerShell/PowerShell/releases/tag/v7.3.0) for .net 7.0 tests
67
- PowerShell [7.2.1](https://github.com/PowerShell/PowerShell/releases/tag/v7.2.1) for .net 6.0 tests
78
- PowerShell [7.1.5](https://github.com/PowerShell/PowerShell/releases/tag/v7.1.5) for .net 5.0 tests
89
- PowerShell [7.0.8](https://github.com/PowerShell/PowerShell/releases/tag/v7.0.8) for .net core 3.1 tests
910
- Install-Module -Name [InvokeBuild](https://www.powershellgallery.com/packages/InvokeBuild/5.9.12) -RequiredVersion 5.9.12
1011
- Install-Module -Name [ThirdPartyLibraries](https://www.powershellgallery.com/packages/ThirdPartyLibraries/3.1.2) -RequiredVersion 3.1.2
1112
- .net framework 4.7.2+ sdk
12-
- .net 6.0 sdk
13+
- .net 7.0 sdk
1314
- docker, switched to linux containers
1415

1516
## How to build

Build/build-scripts.ps1

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -156,26 +156,30 @@ function Wait-Connection {
156156
$timeout = 50
157157
)
158158

159-
$connection = New-Object -TypeName $connectionName -ArgumentList $connectionString
160-
try {
161-
for ($i = 0; $i -lt $timeout; $i++) {
162-
try {
163-
$connection.Open()
164-
return
165-
}
166-
catch {
167-
Start-Sleep -Seconds 1
168-
}
159+
function Test-Connection {
160+
$connection = New-Object -TypeName $connectionName -ArgumentList $connectionString
161+
try {
162+
$connection.Open()
169163
}
164+
finally {
165+
$connection.Dispose()
166+
}
167+
}
170168

169+
for ($i = 0; $i -lt $timeout; $i++) {
171170
try {
172-
$connection.Open()
171+
Test-Connection
172+
return
173173
}
174174
catch {
175-
throw "$connectionName $connectionString"
175+
Start-Sleep -Seconds 1
176176
}
177177
}
178-
finally {
179-
$connection.Dispose()
178+
179+
try {
180+
Test-Connection
181+
}
182+
catch {
183+
throw "$connectionName $connectionString"
180184
}
181185
}

Build/build-tasks.ps1

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -103,25 +103,16 @@ task PackManualDownload PackGlobalTool, PackPoweShellModule, {
103103
$thirdParty = Join-Path $settings.bin "ThirdPartyNotices.txt"
104104
$packageVersion = $settings.version
105105

106-
$destination = Join-Path $out "SqlDatabase.$packageVersion-net452.zip"
107-
$source = Join-Path $settings.bin "SqlDatabase\net452\*"
108-
Compress-Archive -Path $source, $lic, $thirdParty -DestinationPath $destination
109-
110106
$destination = Join-Path $out "SqlDatabase.$packageVersion-PowerShell.zip"
111107
$source = Join-Path $settings.artifactsPowerShell "*"
112108
Compress-Archive -Path $source -DestinationPath $destination
113109

114-
$destination = Join-Path $out "SqlDatabase.$packageVersion-netcore31.zip"
115-
$source = Join-Path $settings.bin "SqlDatabase\netcoreapp3.1\publish\*"
116-
Compress-Archive -Path $source, $lic, $thirdParty -DestinationPath $destination
117-
118-
$destination = Join-Path $out "SqlDatabase.$packageVersion-net50.zip"
119-
$source = Join-Path $settings.bin "SqlDatabase\net5.0\publish\*"
120-
Compress-Archive -Path $source, $lic, $thirdParty -DestinationPath $destination
121-
122-
$destination = Join-Path $out "SqlDatabase.$packageVersion-net60.zip"
123-
$source = Join-Path $settings.bin "SqlDatabase\net6.0\publish\*"
124-
Compress-Archive -Path $source, $lic, $thirdParty -DestinationPath $destination
110+
$targets = "net452", "netcoreapp3.1", "net5.0", "net6.0", "net7.0"
111+
foreach ($target in $targets) {
112+
$destination = Join-Path $out "SqlDatabase.$packageVersion-$target.zip"
113+
$source = Join-Path $settings.bin "SqlDatabase\$target\*"
114+
Compress-Archive -Path $source, $lic, $thirdParty -DestinationPath $destination
115+
}
125116
}
126117

127118
task UnitTest {
@@ -130,6 +121,7 @@ task UnitTest {
130121
@{ File = "build-tasks.unit-test.ps1"; Task = "Test"; settings = $settings; targetFramework = "netcoreapp3.1" }
131122
@{ File = "build-tasks.unit-test.ps1"; Task = "Test"; settings = $settings; targetFramework = "net5.0" }
132123
@{ File = "build-tasks.unit-test.ps1"; Task = "Test"; settings = $settings; targetFramework = "net6.0" }
124+
@{ File = "build-tasks.unit-test.ps1"; Task = "Test"; settings = $settings; targetFramework = "net7.0" }
133125
)
134126

135127
Build-Parallel $builds -ShowParameter targetFramework -MaximumBuilds 4
@@ -221,7 +213,8 @@ task SdkToolTest {
221213
$images = $(
222214
"sqldatabase/dotnet_pwsh:3.1-sdk"
223215
, "sqldatabase/dotnet_pwsh:5.0-sdk"
224-
, "sqldatabase/dotnet_pwsh:6.0-sdk")
216+
, "sqldatabase/dotnet_pwsh:6.0-sdk"
217+
, "sqldatabase/dotnet_pwsh:7.0-sdk")
225218

226219
$builds = @()
227220
foreach ($image in $images) {
@@ -241,9 +234,10 @@ task SdkToolTest {
241234

242235
task NetRuntimeLinuxTest {
243236
$testCases = $(
244-
@{ targetFramework = "netcore31"; image = "sqldatabase/dotnet_pwsh:3.1-runtime" }
245-
, @{ targetFramework = "net50"; image = "sqldatabase/dotnet_pwsh:5.0-runtime" }
246-
, @{ targetFramework = "net60"; image = "sqldatabase/dotnet_pwsh:6.0-runtime" }
237+
@{ targetFramework = "netcoreapp3.1"; image = "sqldatabase/dotnet_pwsh:3.1-runtime" }
238+
, @{ targetFramework = "net5.0"; image = "sqldatabase/dotnet_pwsh:5.0-runtime" }
239+
, @{ targetFramework = "net6.0"; image = "sqldatabase/dotnet_pwsh:6.0-runtime" }
240+
, @{ targetFramework = "net7.0"; image = "sqldatabase/dotnet_pwsh:7.0-runtime" }
247241
)
248242

249243
$builds = @()
@@ -266,9 +260,10 @@ task NetRuntimeLinuxTest {
266260
task NetRuntimeWindowsTest {
267261
$testCases = $(
268262
"net452"
269-
, "netcore31"
270-
, "net50"
271-
, "net60"
263+
, "netcoreapp3.1"
264+
, "net5.0"
265+
, "net6.0"
266+
, "net7.0"
272267
)
273268

274269
$builds = @()

Build/create-images-tasks.ps1

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ task Default `
55
, BuildDotnetRuntime50 `
66
, BuildDotnetSdk60 `
77
, BuildDotnetRuntime60 `
8+
, BuildDotnetSdk70 `
9+
, BuildDotnetRuntime70 `
810
, BuildMsSqlDatabase `
911
, BuildPgSqlDatabase `
1012
, BuildMySqlDatabase
@@ -92,3 +94,21 @@ task BuildDotnetRuntime60 {
9294
.
9395
}
9496
}
97+
98+
task BuildDotnetSdk70 {
99+
exec {
100+
docker build `
101+
-f image-dotnet-sdk-7.0.dockerfile `
102+
-t sqldatabase/dotnet_pwsh:7.0-sdk `
103+
.
104+
}
105+
}
106+
107+
task BuildDotnetRuntime70 {
108+
exec {
109+
docker build `
110+
-f image-dotnet-runtime-7.0.dockerfile `
111+
-t sqldatabase/dotnet_pwsh:7.0-runtime `
112+
.
113+
}
114+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM mcr.microsoft.com/dotnet/runtime:7.0
2+
3+
RUN apt-get update && \
4+
apt-get install -y curl && \
5+
curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.3.0/powershell_7.3.0-1.deb_amd64.deb --output powershell.deb && \
6+
dpkg -i powershell.deb && \
7+
apt-get install -f && \
8+
rm -f powershell.deb
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM mcr.microsoft.com/dotnet/sdk:7.0
2+
3+
RUN apt-get update && \
4+
curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.3.0/powershell_7.3.0-1.deb_amd64.deb --output powershell.deb && \
5+
dpkg -i powershell.deb && \
6+
apt-get install -f && \
7+
rm -f powershell.deb

Build/third-party-libraries/packages/nuget.org/castle.core/4.4.0/index.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"netcoreapp3.1",
1212
"net5.0",
1313
"net6.0",
14+
"net7.0",
1415
"net472"
1516
],
1617
"Dependencies": [

Build/third-party-libraries/packages/nuget.org/castle.core/4.4.0/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Castle.Core [4.4.0](https://www.nuget.org/packages/Castle.Core/4.4.0)
33

44
Used by: SqlDatabase internal
55

6-
Target frameworks: net472, net5.0, net6.0, netcoreapp3.1
6+
Target frameworks: net472, net5.0, net6.0, net7.0, netcoreapp3.1
77

88
License: [Apache-2.0](../../../../licenses/apache-2.0)
99

Build/third-party-libraries/packages/nuget.org/dapper.strongname/2.0.123/index.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"netcoreapp3.1",
1212
"net5.0",
1313
"net6.0",
14+
"net7.0",
1415
"net472"
1516
]
1617
}

Build/third-party-libraries/packages/nuget.org/dapper.strongname/2.0.123/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Dapper.StrongName [2.0.123](https://www.nuget.org/packages/Dapper.StrongName/2.0
33

44
Used by: SqlDatabase internal
55

6-
Target frameworks: net472, net5.0, net6.0, netcoreapp3.1
6+
Target frameworks: net472, net5.0, net6.0, net7.0, netcoreapp3.1
77

88
License: [Apache-2.0](../../../../licenses/apache-2.0)
99

0 commit comments

Comments
 (0)