Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
c20f770
update version to 4.4.0
max-ieremenko Oct 2, 2025
0f4deed
migrate .sln to .slnx
max-ieremenko Oct 2, 2025
2a13771
Merge pull request #69 from max-ieremenko/migrate/slnx
max-ieremenko Oct 2, 2025
56be9ef
update ThirdPartyLibraries tool
max-ieremenko Oct 3, 2025
f9dc402
update third-party-notices
max-ieremenko Oct 3, 2025
e9ce4c1
Merge pull request #70 from max-ieremenko/update/ThirdPartyLibraries
max-ieremenko Oct 3, 2025
4278a6f
freeze versions of binary tools
max-ieremenko Oct 3, 2025
bafca14
Merge pull request #71 from max-ieremenko/build/fix-binary
max-ieremenko Oct 3, 2025
9719fb0
remove .net 6
max-ieremenko Oct 4, 2025
714ba2d
build remove .net 6
max-ieremenko Oct 4, 2025
a83dca9
update third-party-notices
max-ieremenko Oct 4, 2025
5043e23
Merge pull request #72 from max-ieremenko/remove/net6
max-ieremenko Oct 4, 2025
4bac3f0
update InvokeBuild
max-ieremenko Oct 4, 2025
e49b441
Merge pull request #73 from max-ieremenko/update/InvokeBuild
max-ieremenko Oct 4, 2025
c979f1f
c 2025
max-ieremenko Oct 4, 2025
15b9530
.sln update dependencies
max-ieremenko Oct 4, 2025
c3769bd
update third-party-notices
max-ieremenko Oct 4, 2025
beee679
Merge pull request #74 from max-ieremenko/update/dependencies
max-ieremenko Oct 4, 2025
7481f83
pwsh 7.6 test coverage
max-ieremenko Oct 4, 2025
776017f
Merge pull request #75 from max-ieremenko/test/pwsh-7.6
max-ieremenko Oct 4, 2025
a855367
update Npgsql, MySqlConnector
max-ieremenko Oct 4, 2025
35eb19e
update third-party-notices
max-ieremenko Oct 4, 2025
807fb7e
Merge pull request #76 from max-ieremenko/update/sql
max-ieremenko Oct 4, 2025
0a1bf35
.sln target .net10
max-ieremenko Oct 5, 2025
0596b2f
build target .net10
max-ieremenko Oct 5, 2025
2edff94
.net10
max-ieremenko Oct 5, 2025
f0442fb
update third-party-notices
max-ieremenko Oct 5, 2025
4af8824
Merge pull request #77 from max-ieremenko/net/10
max-ieremenko Oct 5, 2025
1e04f88
update mssql version in tests
max-ieremenko Oct 5, 2025
f98f7fc
Merge pull request #78 from max-ieremenko/update/mssql
max-ieremenko Oct 5, 2025
4b821a4
update mysql version in tests
max-ieremenko Oct 5, 2025
099bd6f
Merge pull request #79 from max-ieremenko/update/mysql
max-ieremenko Oct 5, 2025
74bfb33
update postgres version in tests
max-ieremenko Oct 5, 2025
d535b40
Merge pull request #80 from max-ieremenko/update/postgres
max-ieremenko Oct 5, 2025
7de73dd
remove nuget.exe
max-ieremenko Oct 5, 2025
68420fb
Merge pull request #81 from max-ieremenko/remove/nuget.exe
max-ieremenko Oct 5, 2025
80b0541
update version to 4.4.0
max-ieremenko Oct 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions Build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
build.ps1 is designed to run on windows

- PowerShell Desktop 5.1
- PowerShell [7.5.0](https://github.com/PowerShell/PowerShell/releases/tag/v7.5.0-preview.4) for .net 9.0 tests
- PowerShell [7.3.0](https://github.com/PowerShell/PowerShell/releases/tag/v7.3.0) for .net 8.0 tests
- PowerShell [7.2.1](https://github.com/PowerShell/PowerShell/releases/tag/v7.2.1) for .net 6.0 tests
- PowerShell [7.6.0](https://github.com/PowerShell/PowerShell/releases/tag/v7.6.0-preview.4) for .net 10.0 tests
- PowerShell [7.5.3](https://github.com/PowerShell/PowerShell/releases/tag/v7.5.3) for .net 9.0 tests
- PowerShell [7.4.12](https://github.com/PowerShell/PowerShell/releases/tag/v7.4.12) for .net 8.0 tests
- Install-Module -Name [InvokeBuild](https://www.powershellgallery.com/packages/InvokeBuild)
- Install-Module -Name [ThirdPartyLibraries](https://www.powershellgallery.com/packages/ThirdPartyLibraries)
- .net framework 4.7.2+ sdk
- .net 9.0 sdk
- .net 10.0 sdk
- docker, switched to linux containers

## How to build
Expand Down
4 changes: 2 additions & 2 deletions Build/build.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Requires -Version "7.0"
#Requires -Modules @{ ModuleName="InvokeBuild"; ModuleVersion="5.11.3" }
#Requires -Modules @{ ModuleName="ThirdPartyLibraries"; ModuleVersion="3.6.0" }
#Requires -Modules @{ ModuleName="InvokeBuild"; ModuleVersion="5.14.19" }
#Requires -Modules @{ ModuleName="ThirdPartyLibraries"; ModuleVersion="3.8.0" }

[CmdletBinding()]
param (
Expand Down
2 changes: 1 addition & 1 deletion Build/create-images.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Requires -Version "7.0"
#Requires -Modules @{ ModuleName="InvokeBuild"; ModuleVersion="5.11.3" }
#Requires -Modules @{ ModuleName="InvokeBuild"; ModuleVersion="5.14.19" }

Set-StrictMode -Version Latest

Expand Down
3 changes: 1 addition & 2 deletions Build/install-dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ $ErrorActionPreference = 'Stop'
. (Join-Path $PSScriptRoot 'scripts/Invoke-InstallModule.ps1')

if ('.net' -in $List) {
Invoke-InstallDotNet -Version '6.0.422'
Invoke-InstallDotNet -Version '8.0.403'
Invoke-InstallDotNet -Version '9.0.100-rc.2.24474.11'
Invoke-InstallDotNet -Version '9.0.300'

$version = (Get-Content -Raw (Join-Path $PSScriptRoot '../Sources/global.json') | ConvertFrom-Json).sdk.version
Invoke-InstallDotNet -Version $version
Expand Down
Binary file removed Build/nuget.exe
Binary file not shown.
Binary file added Build/scripts/MySqlConnector.dll
Binary file not shown.
Binary file added Build/scripts/Npgsql.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion Build/scripts/Start-Mssql.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function Start-Mssql {
param ()

$container = Start-Container -Image sqldatabase/mssql:2017 -ContainerPort 1433
$container = Start-Container -Image sqldatabase/mssql:2025 -ContainerPort 1433
$port = $container.port

$builder = New-Object -TypeName System.Data.SqlClient.SqlConnectionStringBuilder
Expand Down
5 changes: 3 additions & 2 deletions Build/scripts/Start-Mysql.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
function Start-Mysql {
param ()

$sqlConnectordll = Join-Path $env:USERPROFILE '\.nuget\packages\mysqlconnector\1.3.10\lib\netstandard2.0\MySqlConnector.dll'
# https://www.nuget.org/packages/MySqlConnector/1.3.10 lib/netstandard2.0/MySqlConnector.dll
$sqlConnectordll = Join-Path $PSScriptRoot 'MySqlConnector.dll'
Add-Type -Path $sqlConnectordll

$container = Start-Container -Image sqldatabase/mysql:8.0.25 -ContainerPort 3306
$container = Start-Container -Image sqldatabase/mysql:9.4 -ContainerPort 3306

$builder = New-Object -TypeName MySqlConnector.MySqlConnectionStringBuilder
$builder['Database'] = 'sqldatabasetest'
Expand Down
5 changes: 3 additions & 2 deletions Build/scripts/Start-Pgsql.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
function Start-Pgsql {
param ()

$npgsqldll = Join-Path $env:USERPROFILE '.nuget\packages\npgsql\4.0.16\lib\netstandard2.0\Npgsql.dll'
# https://www.nuget.org/packages/Npgsql/4.0.16 lib/netstandard2.0/Npgsql.dll
$npgsqldll = Join-Path $PSScriptRoot 'Npgsql.dll'
Add-Type -Path $npgsqldll

$container = Start-Container -Image sqldatabase/postgres:13.3 -ContainerPort 5432
$container = Start-Container -Image sqldatabase/postgres:18.0 -ContainerPort 5432

$builder = New-Object -TypeName Npgsql.NpgsqlConnectionStringBuilder
$builder['Database'] = 'sqldatabasetest'
Expand Down
1 change: 1 addition & 0 deletions Build/show-powershell-images.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ function Get-ShortVersion {
}
}

# https://learn.microsoft.com/en-us/powershell/scripting/install/powershell-support-lifecycle
(Invoke-RestMethod -Uri 'https://mcr.microsoft.com/v2/powershell/tags/list').tags `
| Where-Object { ($_ -Like '[0-9]*') -or ($_ -Like 'preview-[0-9]*') } `
| Get-ShortVersion `
Expand Down
35 changes: 16 additions & 19 deletions Build/tasks/build-tasks.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ task Initialize {
$artifacts = Join-Path $bin 'artifacts'

$script:settings = @{
nugetexe = Join-Path $root 'Build\nuget.exe'
sources = $sources
bin = $bin
artifacts = $artifacts
Expand All @@ -30,7 +29,7 @@ task Initialize {
repositoryCommitId = git rev-parse HEAD
}

$script:frameworks = 'net472', 'net6.0', 'net8.0', 'net9.0'
$script:frameworks = 'net472', 'net8.0', 'net9.0', 'net10.0'
$script:databases = 'MsSql', 'PgSql', 'MySql'

Write-Output "PackageVersion: $($settings.version)"
Expand All @@ -45,7 +44,7 @@ task Clean {
}

task Build {
$solutionFile = Join-Path $settings.sources 'SqlDatabase.sln'
$solutionFile = Join-Path $settings.sources 'SqlDatabase.slnx'
exec { dotnet restore $solutionFile }
exec { dotnet build $solutionFile -t:Rebuild -p:Configuration=Release }
}
Expand All @@ -62,8 +61,6 @@ task PackGlobalTool {
-c Release `
-p:PackAsTool=true `
-p:GlobalTool=true `
-p:PackageVersion=$($settings.version) `
-p:RepositoryCommit=$($settings.repositoryCommitId) `
-o $($settings.artifacts) `
$projectFile
}
Expand Down Expand Up @@ -95,14 +92,13 @@ task PackNuget472 PackPoweShellModule, {
}

$nuspec = Join-Path $settings.sources 'SqlDatabase.Package\nuget\package.nuspec'
exec {
& $($settings.nugetexe) pack `
-NoPackageAnalysis `
-verbosity detailed `
-OutputDirectory $($settings.artifacts) `
-Version $($settings.version) `
-p RepositoryCommit=$($settings.repositoryCommitId) `
-p bin=$bin `
exec {
dotnet pack `
--no-build `
--version=$($settings.version) `
-p:RepositoryCommit=$($settings.repositoryCommitId) `
-p:bin=$bin `
-o $($settings.artifacts) `
$nuspec
}
}
Expand Down Expand Up @@ -188,7 +184,8 @@ task PsCoreTest {
, 'mcr.microsoft.com/powershell:7.2.2-ubuntu-20.04'
, 'mcr.microsoft.com/powershell:7.3-ubuntu-20.04'
, 'mcr.microsoft.com/powershell:7.4-ubuntu-20.04'
, 'mcr.microsoft.com/powershell:preview-7.5-ubuntu-20.04')
, 'mcr.microsoft.com/powershell:7.5-ubuntu-24.04'
, 'mcr.microsoft.com/powershell:preview-7.6-ubuntu-24.04')

$builds = @()
foreach ($image in $images) {
Expand All @@ -209,9 +206,9 @@ task PsCoreTest {

task SdkToolTest {
$images = $(
'sqldatabase/dotnet_pwsh:6.0-sdk'
, 'sqldatabase/dotnet_pwsh:8.0-sdk'
, 'sqldatabase/dotnet_pwsh:9.0-sdk')
'sqldatabase/dotnet_pwsh:8.0-sdk'
, 'sqldatabase/dotnet_pwsh:9.0-sdk'
, 'sqldatabase/dotnet_pwsh:10.0-sdk')

$builds = @()
foreach ($image in $images) {
Expand All @@ -230,9 +227,9 @@ task SdkToolTest {

task NetRuntimeLinuxTest {
$testCases = $(
@{ targetFramework = 'net6.0'; image = 'sqldatabase/dotnet_pwsh:6.0-runtime' }
, @{ targetFramework = 'net8.0'; image = 'sqldatabase/dotnet_pwsh:8.0-runtime' }
@{ targetFramework = 'net8.0'; image = 'sqldatabase/dotnet_pwsh:8.0-runtime' }
, @{ targetFramework = 'net9.0'; image = 'sqldatabase/dotnet_pwsh:9.0-runtime' }
, @{ targetFramework = 'net10.0'; image = 'sqldatabase/dotnet_pwsh:10.0-runtime' }
)

$builds = @()
Expand Down
2 changes: 1 addition & 1 deletion Build/tasks/build-tasks.unit-test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ param(
$Sources,

[Parameter(Mandatory)]
[ValidateSet('net472', 'net6.0', 'net8.0', 'net9.0')]
[ValidateSet('net472', 'net8.0', 'net9.0', 'net10.0')]
[string]
$Framework
)
Expand Down
54 changes: 27 additions & 27 deletions Build/tasks/create-images-tasks.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
task . `
BuildDotnetSdk60 `
, BuildDotnetSdk80 `
BuildDotnetSdk80 `
, BuildDotnetSdk90 `
, BuildDotnetRuntime60 `
, BuildDotnetSdk100 `
, BuildDotnetRuntime80 `
, BuildDotnetRuntime90 `
, BuildDotnetRuntime100 `
, BuildMsSqlDatabase `
, BuildPgSqlDatabase `
, BuildMySqlDatabase
Expand All @@ -14,100 +14,100 @@ Enter-Build {
}

task BuildMsSqlDatabase {
$dockerfile = Join-Path $context 'image-mssql-2017.dockerfile'
$dockerfile = Join-Path $context 'image-mssql.dockerfile'
exec {
docker build `
--pull `
-f $dockerfile `
-t sqldatabase/mssql:2017 `
-t sqldatabase/mssql:2025 `
$context
}
}

task BuildPgSqlDatabase {
$dockerfile = Join-Path $context 'image-postgres-133.dockerfile'
$dockerfile = Join-Path $context 'image-postgres.dockerfile'
exec {
docker build `
--pull `
-f $dockerfile `
-t sqldatabase/postgres:13.3 `
-t sqldatabase/postgres:18.0 `
$context
}
}

task BuildMySqlDatabase {
$dockerfile = Join-Path $context 'image-mysql-8025.dockerfile'
$dockerfile = Join-Path $context 'image-mysql.dockerfile'
exec {
docker build `
--pull `
-f $dockerfile `
-t sqldatabase/mysql:8.0.25 `
-t sqldatabase/mysql:9.4 `
$context
}
}

task BuildDotnetSdk60 {
$dockerfile = Join-Path $context 'image-dotnet-sdk-6.0.dockerfile'
task BuildDotnetSdk80 {
$dockerfile = Join-Path $context 'image-dotnet-sdk-8.0.dockerfile'
exec {
docker build `
--pull `
-f $dockerfile `
-t sqldatabase/dotnet_pwsh:6.0-sdk `
-t sqldatabase/dotnet_pwsh:8.0-sdk `
.
}
}

task BuildDotnetRuntime60 {
$dockerfile = Join-Path $context 'image-dotnet-runtime-6.0.dockerfile'
task BuildDotnetRuntime80 {
$dockerfile = Join-Path $context 'image-dotnet-runtime-8.0.dockerfile'
exec {
docker build `
--pull `
-f $dockerfile `
-t sqldatabase/dotnet_pwsh:6.0-runtime `
-t sqldatabase/dotnet_pwsh:8.0-runtime `
.
}
}

task BuildDotnetSdk80 {
$dockerfile = Join-Path $context 'image-dotnet-sdk-8.0.dockerfile'
task BuildDotnetSdk90 {
$dockerfile = Join-Path $context 'image-dotnet-sdk-9.0.dockerfile'
exec {
docker build `
--pull `
-f $dockerfile `
-t sqldatabase/dotnet_pwsh:8.0-sdk `
-t sqldatabase/dotnet_pwsh:9.0-sdk `
.
}
}

task BuildDotnetRuntime80 {
$dockerfile = Join-Path $context 'image-dotnet-runtime-8.0.dockerfile'
task BuildDotnetRuntime90 {
$dockerfile = Join-Path $context 'image-dotnet-runtime-9.0.dockerfile'
exec {
docker build `
--pull `
-f $dockerfile `
-t sqldatabase/dotnet_pwsh:8.0-runtime `
-t sqldatabase/dotnet_pwsh:9.0-runtime `
.
}
}

task BuildDotnetSdk90 {
$dockerfile = Join-Path $context 'image-dotnet-sdk-9.0.dockerfile'
task BuildDotnetSdk100 {
$dockerfile = Join-Path $context 'image-dotnet-sdk-10.0.dockerfile'
exec {
docker build `
--pull `
-f $dockerfile `
-t sqldatabase/dotnet_pwsh:9.0-sdk `
-t sqldatabase/dotnet_pwsh:10.0-sdk `
.
}
}

task BuildDotnetRuntime90 {
$dockerfile = Join-Path $context 'image-dotnet-runtime-9.0.dockerfile'
task BuildDotnetRuntime100 {
$dockerfile = Join-Path $context 'image-dotnet-runtime-10.0.dockerfile'
exec {
docker build `
--pull `
-f $dockerfile `
-t sqldatabase/dotnet_pwsh:9.0-runtime `
-t sqldatabase/dotnet_pwsh:10.0-runtime `
.
}
}
5 changes: 0 additions & 5 deletions Build/tests.txt

This file was deleted.

9 changes: 9 additions & 0 deletions Build/third-party-libraries/configuration/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/max-ieremenko/ThirdPartyLibraries/refs/heads/master/Docs/schema.appsettings.json",
"nuget.org": {
"allowToUseLocalCache": true,
"downloadPackageIntoRepository": false,
Expand Down Expand Up @@ -65,5 +66,13 @@
]
}
]
},
"repository": {
"remarks.md": {
"keepEmptyFile": false
},
"third-party-notices.txt": {
"keepEmptyFile": "IfRequiredByLicense"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,27 @@ Description
-----------
{{Description}}

{%- if Remarks -%}
Remarks
-----------
{{Remarks}}

{%- endif -%}
{%- if ThirdPartyNotices -%}
Third party notices
-----------
{{ThirdPartyNotices}}
{%- endif -%}

{%- endif -%}
{%- if DependenciesCount > 0 -%}
Dependencies {{DependenciesCount}}
-----------

{%- if DependenciesCount > 0 -%}
|Name|Version|
|----------|:----|
{%- for dependency in Dependencies -%}
|[{{dependency.Name}}]({{dependency.LocalHRef}})|{{dependency.Version}}|
{%- endfor -%}
{%- endif -%}

{%- endif -%}
*This page was generated by a tool.*
1 change: 1 addition & 0 deletions Build/third-party-libraries/licenses/apache-2.0/index.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/max-ieremenko/ThirdPartyLibraries/refs/heads/master/Docs/schema.license-index.json",
"Code": "Apache-2.0",
"FullName": "Apache License 2.0",
"RequiresApproval": false,
Expand Down
Loading