diff --git a/Source/Directory.Package.props b/Source/Directory.Package.props index 1de230a6fb..9d04c7dc30 100644 --- a/Source/Directory.Package.props +++ b/Source/Directory.Package.props @@ -1,8 +1,19 @@ + + + + + + + @(VersionJsonLines) + $([System.Text.RegularExpressions.Regex]::Match($(VersionJsonContent), '"version"\s*:\s*"([^"]+)"').Groups[1].Value) + + + $(PackageVersionFromJson) MIT https://cslanet.com ..\..\bin\packages\ @@ -32,6 +43,13 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + $(PackageVersionFromJson) + + diff --git a/Source/version.json b/Source/version.json index d85fd81bc9..d820711bec 100644 --- a/Source/version.json +++ b/Source/version.json @@ -1,5 +1,13 @@ { "$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "10.0.0-alpha.1", - "publicReleaseRefSpec": [ "^refs/heads/release$" ] + "version": "10.0.0-alpha.3", + "publicReleaseRefSpec": [ + "^refs/heads/.*" + ], + "nuGetPackageVersion": { + "semVer": 2 + }, + "assemblyVersion": { + "precision": "build" + } } diff --git a/Support/push-nuget-packages.sh b/Support/push-nuget-packages.sh new file mode 100644 index 0000000000..8054460369 --- /dev/null +++ b/Support/push-nuget-packages.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# Push NuGet packages to nuget.org +# Usage: ./push-nuget-packages.sh + +set -e + +if [ -z "$1" ]; then + echo "Error: API key parameter is required" + echo "Usage: $0 " + exit 1 +fi + +API_KEY="$1" +PACKAGES_DIR="$(dirname "$0")/../bin/packages" + +if [ ! -d "$PACKAGES_DIR" ]; then + echo "Error: Packages directory not found: $PACKAGES_DIR" + exit 1 +fi + +NUPKG_FILES=("$PACKAGES_DIR"/*.nupkg) + +if [ ! -e "${NUPKG_FILES[0]}" ]; then + echo "Error: No .nupkg files found in $PACKAGES_DIR" + exit 1 +fi + +echo "Found $(find "$PACKAGES_DIR" -name "*.nupkg" | wc -l) NuGet package(s) to push..." + +for package in "$PACKAGES_DIR"/*.nupkg; do + if [ -f "$package" ]; then + echo "Pushing $package..." + dotnet nuget push "$package" --api-key "$API_KEY" --source https://api.nuget.org/v3/index.json + echo "✓ Successfully pushed $(basename "$package")" + fi +done + +echo "✓ All packages pushed successfully!" diff --git a/docs/dev/Create-a-CSLA-.NET-release.md b/docs/dev/Create-a-CSLA-.NET-release.md index a8b2a4092e..53a54c3fc1 100644 --- a/docs/dev/Create-a-CSLA-.NET-release.md +++ b/docs/dev/Create-a-CSLA-.NET-release.md @@ -1,45 +1,43 @@ -Prerequisites -------------- +# Create a CSLA .NET release + +## Prerequisites + You must have: -1. PC - 1. Windows 11 or 10 - 2. .NET 6 SDK - 2. .NET 7 SDK - 2. .NET 8 SDK - 3. Visual Studio 2022 with the latest updates - 1. Maui - 1. UWP SDK - 1. Blazor templates - -Semantic Versioning -------------------- +1. Windows PC + a. Windows 11 + a. .NET SDKs + 1. 8 SDK + 1. 9 SDK + 1. 10 SDK + a. Visual Studio 2026 with the latest updates/toolsets + 1. Maui + 1. Blazor templates + +## Semantic Versioning + CSLA .NET, starting with version 4.9.0, follows the [semantic versioning (semver)](https://semver.org/) guidelines. Version numbers should follow the semver guidance from that point forward. -NuGet release -------------- +## NuGet release + 1. Pull the latest code from MarimerLLC/csla -1. Open the csla.build.sln - 1. Update version numbers - 1. `cd /Source` - 1. Edit `Directory.Build.props` and update the version number - 1. `grep -rl --include=*.cs --include=*.csproj --include=*.Build.props '7\.0\.2' | xargs sed -i 's/7\.0\.2/8.0.0/g'` - 1. Adjust the version numbers to match current versions - 1. Build the solution in Release mode; Any CPU +1. Open the `Source/version.json` file and update the version number 1. Do NuGet release - 1. Open a powershell window - 1. Run the `nuget/Build All.ps1` script (add /prerelease:yymmddxx for test release) - 1. Make sure you have Rocky's NuGet key installed (see Nuget.org) - 1. Run the `nuget/Push All.ps1` script + 1. Open a terminal window + 1. Change to the `csla/Source` folder + 1. Run `dotnet pack csla.build.sln` + 1. Make sure you have Rocky's NuGet API key (see Nuget.org) + 1. Change to the `csla/Support` folder + 1. Run the `csla/Support/push-nuget-packages.sh` bash script to push the packages + +## Finalize Release -Finalize Release ----------------- 1. Update GitHub 1. Update [releasenotes.md](https://github.com/MarimerLLC/csla/blob/master/releasenotes.md) 1. Commit all changes to git - 1. Create PR + 1. Create PR 1. Accept PR 1. In the GitHub releases web page create the release - 1. Create a new release at HEAD using the version number (such as v7.0.2) - 1. Name the release like "Version 7.0.2 Release" + 1. Create a new release at HEAD using the version number (such as v10.0.2) + 1. Name the release like "Version 10.0.2 Release" 1. Mark the release as pre-release or release