From d1bd2a8bde3a2158948f5ef2ff78eea9a8253a40 Mon Sep 17 00:00:00 2001 From: Hendrik Bulens Date: Tue, 11 Nov 2025 18:09:50 +0100 Subject: [PATCH 1/2] Bump to .NET 10 --- publish-packages.ps1 | 88 +++++++++++++++++++ .../Dime.Repositories.Sql.csproj | 12 +-- .../Dime.Repositories.csproj | 10 +-- ...me.Repositories.Sql.EntityFramework.csproj | 16 ++-- ...ositories.Sql.EntityFramework.Tests.csproj | 10 +-- 5 files changed, 112 insertions(+), 24 deletions(-) create mode 100644 publish-packages.ps1 diff --git a/publish-packages.ps1 b/publish-packages.ps1 new file mode 100644 index 0000000..4b2ae84 --- /dev/null +++ b/publish-packages.ps1 @@ -0,0 +1,88 @@ +#!/usr/bin/env pwsh + +<# +.SYNOPSIS + Publishes all NuGet packages from bin/Release folders to the DS source. + +.DESCRIPTION + This script searches for all .nupkg files in bin/Release folders and publishes them + using dotnet push with the DS source and az key. + +.EXAMPLE + .\publish-packages.ps1 +#> + +[CmdletBinding()] +param() + +$ErrorActionPreference = "Stop" + +# Get the script directory (project root) +$projectRoot = $PSScriptRoot + +Write-Host "Searching for NuGet packages in bin/Release folders..." -ForegroundColor Cyan + +# Find all .nupkg files in bin/Release folders, excluding symbols packages +$allPackages = Get-ChildItem -Path $projectRoot -Filter "*.nupkg" -Recurse | + Where-Object { + $_.FullName -match "bin\\Release" -and + $_.Name -notlike "*.symbols.nupkg" + } + +# Group by directory and select only the most recent package from each folder +$packages = $allPackages | + Group-Object -Property DirectoryName | + ForEach-Object { + $_.Group | Sort-Object -Property LastWriteTime -Descending | Select-Object -First 1 + } + +if ($packages.Count -eq 0) { + Write-Host "No NuGet packages found in bin/Release folders." -ForegroundColor Yellow + Write-Host "Make sure to build the solution in Release configuration first." -ForegroundColor Yellow + exit 1 +} + +Write-Host "Found $($packages.Count) package(s) to publish:" -ForegroundColor Green +foreach ($package in $packages) { + Write-Host " - $($package.Name)" -ForegroundColor Gray +} + +Write-Host "" + +# Publish each package +$successCount = 0 +$failCount = 0 + +foreach ($package in $packages) { + Write-Host "Publishing $($package.Name)..." -ForegroundColor Cyan + + try { + # Execute dotnet push + dotnet nuget push -s DS -k az $package.FullName + + if ($LASTEXITCODE -eq 0) { + Write-Host " ✓ Successfully published $($package.Name)" -ForegroundColor Green + $successCount++ + } else { + Write-Host " ✗ Failed to publish $($package.Name) (exit code: $LASTEXITCODE)" -ForegroundColor Red + $failCount++ + } + } catch { + Write-Host " ✗ Error publishing $($package.Name): $_" -ForegroundColor Red + $failCount++ + } + + Write-Host "" +} + +# Summary +Write-Host "========================================" -ForegroundColor Cyan +Write-Host "Publication Summary:" -ForegroundColor Cyan +Write-Host " Success: $successCount" -ForegroundColor Green +Write-Host " Failed: $failCount" -ForegroundColor $(if ($failCount -gt 0) { "Red" } else { "Gray" }) +Write-Host "========================================" -ForegroundColor Cyan + +if ($failCount -gt 0) { + exit 1 +} + diff --git a/src/core/Dime.Repositories.Sql/Dime.Repositories.Sql.csproj b/src/core/Dime.Repositories.Sql/Dime.Repositories.Sql.csproj index 13f5ebb..a7fe8e7 100644 --- a/src/core/Dime.Repositories.Sql/Dime.Repositories.Sql.csproj +++ b/src/core/Dime.Repositories.Sql/Dime.Repositories.Sql.csproj @@ -1,13 +1,13 @@  - 2.0.3.0 - 2.0.3.0 - 2.0.3.0 + 3.0.0.0 + 3.0.0.0 + 3.0.0.0 Dime Software - 2.0.3.0 + 3.0.0.0-alpha.1 Dime Software - net8.0 + net10.0 Dime.Repositories.Sql Dime.Repositories.Sql https://cdn.dime-software.com/dime-software/logo-shape.png @@ -32,6 +32,6 @@ - + diff --git a/src/core/Dime.Repositories/Dime.Repositories.csproj b/src/core/Dime.Repositories/Dime.Repositories.csproj index 501e91b..a1006c9 100644 --- a/src/core/Dime.Repositories/Dime.Repositories.csproj +++ b/src/core/Dime.Repositories/Dime.Repositories.csproj @@ -1,11 +1,11 @@  - 2.0.1.0 - 2.0.1.0 - 2.0.1.0 + 3.0.0.0 + 3.0.0.0 + 3.0.0.0 Dime Software - 2.0.1.0 - net8.0 + 3.0.0.0-alpha.1 + net10.0 Dime.Repositories Dime.Repositories https://cdn.dime-software.com/dime-software/logo-shape.png diff --git a/src/providers/EntityFramework/Dime.Repositories.Sql.EntityFramework.csproj b/src/providers/EntityFramework/Dime.Repositories.Sql.EntityFramework.csproj index be3f19d..2ebb00b 100644 --- a/src/providers/EntityFramework/Dime.Repositories.Sql.EntityFramework.csproj +++ b/src/providers/EntityFramework/Dime.Repositories.Sql.EntityFramework.csproj @@ -1,9 +1,9 @@  - 2.0.3.0 - 2.0.3.0 - 2.0.3.0 + 3.0.0.0 + 3.0.0.0 + 3.0.0.0 latest @@ -19,12 +19,12 @@ Dime Software - net8.0 + net10.0 Dime.Repositories.Sql.EntityFramework Dime.Repositories.Sql.EntityFramework Entity Framework;Repository;SQL https://cdn.dime-software.com/dime-software/logo-shape.png - 2.0.3.0 + 3.0.0.0-alpha.1 Implementation of the repository pattern with Microsoft SQL using Entity Framework Core Copyright © 2024 https://github.com/dimesoftware/repository @@ -33,9 +33,9 @@ - - - + + + diff --git a/src/test/Dime.Repositories.Sql.EntityFramework.Tests/Dime.Repositories.Sql.EntityFramework.Tests.csproj b/src/test/Dime.Repositories.Sql.EntityFramework.Tests/Dime.Repositories.Sql.EntityFramework.Tests.csproj index 470fece..f3a4e1d 100644 --- a/src/test/Dime.Repositories.Sql.EntityFramework.Tests/Dime.Repositories.Sql.EntityFramework.Tests.csproj +++ b/src/test/Dime.Repositories.Sql.EntityFramework.Tests/Dime.Repositories.Sql.EntityFramework.Tests.csproj @@ -1,16 +1,16 @@  - net8.0 + net10.0 false - - - - + + + + From 5ede8fcd14e7ce047508f3ebba7e11b5427ec493 Mon Sep 17 00:00:00 2001 From: Hendrik Bulens Date: Thu, 13 Nov 2025 11:39:44 +0100 Subject: [PATCH 2/2] Packages --- src/core/Dime.Repositories.Sql/Dime.Repositories.Sql.csproj | 4 ++-- src/core/Dime.Repositories/Dime.Repositories.csproj | 2 +- .../Dime.Repositories.Sql.EntityFramework.csproj | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/Dime.Repositories.Sql/Dime.Repositories.Sql.csproj b/src/core/Dime.Repositories.Sql/Dime.Repositories.Sql.csproj index a7fe8e7..bc53d79 100644 --- a/src/core/Dime.Repositories.Sql/Dime.Repositories.Sql.csproj +++ b/src/core/Dime.Repositories.Sql/Dime.Repositories.Sql.csproj @@ -19,7 +19,7 @@ Repository contracts with support for SQL databases True True - Copyright © 2024 + Copyright © 2025 https://github.com/dimesoftware/repository https://github.com/dimesoftware/repository @@ -32,6 +32,6 @@ - + diff --git a/src/core/Dime.Repositories/Dime.Repositories.csproj b/src/core/Dime.Repositories/Dime.Repositories.csproj index a1006c9..14859f6 100644 --- a/src/core/Dime.Repositories/Dime.Repositories.csproj +++ b/src/core/Dime.Repositories/Dime.Repositories.csproj @@ -17,7 +17,7 @@ true True True - Copyright © 2024 + Copyright © 2025 https://github.com/dimesoftware/repository https://github.com/dimesoftware/repository git diff --git a/src/providers/EntityFramework/Dime.Repositories.Sql.EntityFramework.csproj b/src/providers/EntityFramework/Dime.Repositories.Sql.EntityFramework.csproj index 2ebb00b..fa8fabc 100644 --- a/src/providers/EntityFramework/Dime.Repositories.Sql.EntityFramework.csproj +++ b/src/providers/EntityFramework/Dime.Repositories.Sql.EntityFramework.csproj @@ -26,7 +26,7 @@ https://cdn.dime-software.com/dime-software/logo-shape.png 3.0.0.0-alpha.1 Implementation of the repository pattern with Microsoft SQL using Entity Framework Core - Copyright © 2024 + Copyright © 2025 https://github.com/dimesoftware/repository https://github.com/dimesoftware/repository git