Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions publish-packages.ps1
Original file line number Diff line number Diff line change
@@ -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
}

14 changes: 7 additions & 7 deletions src/core/Dime.Repositories.Sql/Dime.Repositories.Sql.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<VersionPrefix>2.0.3.0</VersionPrefix>
<AssemblyVersion>2.0.3.0</AssemblyVersion>
<FileVersion>2.0.3.0</FileVersion>
<VersionPrefix>3.0.0.0</VersionPrefix>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<FileVersion>3.0.0.0</FileVersion>
<Authors>Dime Software</Authors>
<Version>2.0.3.0</Version>
<Version>3.0.0.0-alpha.1</Version>
<Authors>Dime Software</Authors>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net10.0</TargetFrameworks>
<AssemblyName>Dime.Repositories.Sql</AssemblyName>
<PackageId>Dime.Repositories.Sql</PackageId>
<PackageIconUrl>https://cdn.dime-software.com/dime-software/logo-shape.png</PackageIconUrl>
Expand All @@ -19,7 +19,7 @@
<Description>Repository contracts with support for SQL databases</Description>
<IncludeSource>True</IncludeSource>
<IncludeSymbols>True</IncludeSymbols>
<Copyright>Copyright © 2024</Copyright>
<Copyright>Copyright © 2025</Copyright>
<PackageLicenseUrl></PackageLicenseUrl>
<PackageProjectUrl>https://github.com/dimesoftware/repository</PackageProjectUrl>
<RepositoryUrl>https://github.com/dimesoftware/repository</RepositoryUrl>
Expand All @@ -32,6 +32,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.1" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.1.3" />
</ItemGroup>
</Project>
12 changes: 6 additions & 6 deletions src/core/Dime.Repositories/Dime.Repositories.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<VersionPrefix>2.0.1.0</VersionPrefix>
<AssemblyVersion>2.0.1.0</AssemblyVersion>
<FileVersion>2.0.1.0</FileVersion>
<VersionPrefix>3.0.0.0</VersionPrefix>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<FileVersion>3.0.0.0</FileVersion>
<Authors>Dime Software</Authors>
<Version>2.0.1.0</Version>
<TargetFrameworks>net8.0</TargetFrameworks>
<Version>3.0.0.0-alpha.1</Version>
<TargetFrameworks>net10.0</TargetFrameworks>
<AssemblyName>Dime.Repositories</AssemblyName>
<PackageId>Dime.Repositories</PackageId>
<PackageIconUrl>https://cdn.dime-software.com/dime-software/logo-shape.png</PackageIconUrl>
Expand All @@ -17,7 +17,7 @@
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<IncludeSource>True</IncludeSource>
<IncludeSymbols>True</IncludeSymbols>
<Copyright>Copyright © 2024</Copyright>
<Copyright>Copyright © 2025</Copyright>
<PackageProjectUrl>https://github.com/dimesoftware/repository</PackageProjectUrl>
<RepositoryUrl>https://github.com/dimesoftware/repository</RepositoryUrl>
<RepositoryType>git</RepositoryType>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup Label="Globals">
<VersionPrefix>2.0.3.0</VersionPrefix>
<AssemblyVersion>2.0.3.0</AssemblyVersion>
<FileVersion>2.0.3.0</FileVersion>
<VersionPrefix>3.0.0.0</VersionPrefix>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<FileVersion>3.0.0.0</FileVersion>
<LangVersion>latest</LangVersion>
</PropertyGroup>

Expand All @@ -19,23 +19,23 @@

<PropertyGroup>
<Authors>Dime Software</Authors>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net10.0</TargetFrameworks>
<AssemblyName>Dime.Repositories.Sql.EntityFramework</AssemblyName>
<PackageId>Dime.Repositories.Sql.EntityFramework</PackageId>
<PackageTags>Entity Framework;Repository;SQL</PackageTags>
<PackageIconUrl>https://cdn.dime-software.com/dime-software/logo-shape.png</PackageIconUrl>
<Version>2.0.3.0</Version>
<Version>3.0.0.0-alpha.1</Version>
<Description>Implementation of the repository pattern with Microsoft SQL using Entity Framework Core</Description>
<Copyright>Copyright © 2024</Copyright>
<Copyright>Copyright © 2025</Copyright>
<PackageProjectUrl>https://github.com/dimesoftware/repository</PackageProjectUrl>
<RepositoryUrl>https://github.com/dimesoftware/repository</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="LinqKit" Version="1.3.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.6" />
<PackageReference Include="LinqKit" Version="1.3.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net10.0</TargetFrameworks>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.6" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.4.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.4.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="MSTest.TestAdapter" Version="4.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="4.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down