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
18 changes: 18 additions & 0 deletions Source/Directory.Package.props
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
<Project>

<!-- Read version from version.json -->
<Target Name="ReadVersionFromJson" BeforeTargets="Build;Pack">
<ReadLinesFromFile File="$(MSBuildThisFileDirectory)version.json">
<Output TaskParameter="Lines" ItemName="VersionJsonLines" />
</ReadLinesFromFile>
<PropertyGroup>
<VersionJsonContent>@(VersionJsonLines)</VersionJsonContent>
<PackageVersionFromJson>$([System.Text.RegularExpressions.Regex]::Match($(VersionJsonContent), '"version"\s*:\s*"([^"]+)"').Groups[1].Value)</PackageVersionFromJson>
</PropertyGroup>
</Target>

<!-- Common Package Settings -->
<PropertyGroup>
<PackageVersion>$(PackageVersionFromJson)</PackageVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://cslanet.com</PackageProjectUrl>
<OutputPath>..\..\bin\packages\</OutputPath>
Expand Down Expand Up @@ -32,6 +43,13 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<!-- Override Nerdbank.GitVersioning package version after it's calculated -->
<Target Name="OverrideNerdBankPackageVersion" BeforeTargets="GenerateNuspec">
<PropertyGroup>
<PackageVersion>$(PackageVersionFromJson)</PackageVersion>
</PropertyGroup>
</Target>

<ItemGroup Condition="'$(IsPackable)'=='true' AND '$(PackageIcon)'!=''">
<None Include="$(MSBuildThisFileDirectory)..\Source\readme.md" Pack="true" PackagePath="\" />
Expand Down
12 changes: 10 additions & 2 deletions Source/version.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
39 changes: 39 additions & 0 deletions Support/push-nuget-packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

# Push NuGet packages to nuget.org
# Usage: ./push-nuget-packages.sh <api-key>

set -e

if [ -z "$1" ]; then
echo "Error: API key parameter is required"
echo "Usage: $0 <api-key>"
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!"
62 changes: 30 additions & 32 deletions docs/dev/Create-a-CSLA-.NET-release.md
Original file line number Diff line number Diff line change
@@ -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
Loading