From 7ad714c2a525cdff474225b6e7d19b9e198a6156 Mon Sep 17 00:00:00 2001 From: John Smith Date: Thu, 12 Nov 2026 11:14:56 +0000 Subject: [PATCH 1/2] chore: target net11.0 beside net10.0 and build with SDK 11 The owner asked for net11.0 beside net10.0 and for global.json to move so SDK 11 builds the tool. bbx already ran on .NET 11 through RollForward Major, so this is for consistency. RollForward stays Major. global.json pins 11.0.100 with rollForward latestFeature, so later 11.0 feature bands build it without jumping to a new major. setup-dotnet also reads latestFeature as 11.0.x and installs the newest 11.0 SDK. CI now installs 10.0.x as well, because the net10.0 tests need the .NET 10 runtime. global.json changes now trigger PR validation. Version goes to 1.5.0 by hand, which the publish workflow ships as-is. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_014Mjr3bTLWVmY8sc2j5bcqH --- .github/workflows/publish.yml | 7 +++++++ AGENTS.md | 7 ++++--- CHANGELOG.md | 11 +++++++++++ README.md | 9 +++++---- global.json | 4 ++-- scripts/smoke.sh | 2 +- src/Bbx/Bbx.csproj | 4 ++-- tests/Bbx.Tests/Bbx.Tests.csproj | 2 +- 8 files changed, 33 insertions(+), 13 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bee7174..9a1fd57 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,6 +18,7 @@ on: - 'src/Bbx/**' - 'tests/Bbx.Tests/**' - '.github/workflows/publish.yml' + - 'global.json' push: branches: [master] paths: @@ -49,6 +50,9 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: + # global.json brings SDK 11, which builds both targets. The net10.0 + # tests still need the .NET 10 runtime, which SDK 11 does not carry. + dotnet-version: 10.0.x global-json-file: global.json - name: Restore @@ -81,6 +85,9 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: + # global.json brings SDK 11, which builds both targets. The net10.0 + # tests still need the .NET 10 runtime, which SDK 11 does not carry. + dotnet-version: 10.0.x global-json-file: global.json - name: Determine and bump version diff --git a/AGENTS.md b/AGENTS.md index 7fa571a..639db3a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -16,9 +16,10 @@ Bitbucket. Output is JSON so scripts and agents can consume it. ## Commands ```bash -dotnet build src/Bbx/Bbx.csproj # net10.0; SDK pinned by global.json -dotnet test tests/Bbx.Tests/Bbx.Tests.csproj # xunit v3, no network -dotnet run --project src/Bbx/Bbx.csproj -f net10.0 -- +dotnet build src/Bbx/Bbx.csproj # net10.0 + net11.0; SDK 11 pinned by global.json +dotnet test tests/Bbx.Tests/Bbx.Tests.csproj # xunit v3, no network; runs both targets +dotnet test tests/Bbx.Tests/Bbx.Tests.csproj -f net10.0 # one target only +dotnet run --project src/Bbx/Bbx.csproj -f net11.0 -- dotnet pack src/Bbx/Bbx.csproj -c Release ``` diff --git a/CHANGELOG.md b/CHANGELOG.md index 74da4ea..d33e829 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,17 @@ so commit history is the source of truth for the fine grain. Versioning follows [Semantic Versioning](https://semver.org/): `MAJOR.MINOR.PATCH`. +## [1.5.0] + +### Changed + +- The package now targets both `net10.0` and `net11.0`. `RollForward` stays + `Major`, so a machine with only a newer runtime still runs it. bbx already ran + on .NET 11 through roll-forward, so this is for consistency, not a fix. +- `global.json` now pins SDK `11.0.100` with `rollForward: latestFeature`, so + any 11.0 feature band builds it. Building from source needs the .NET 11 SDK, + and the `net10.0` tests also need the .NET 10 runtime. CI installs both. + ## [1.4.3] ### Fixed diff --git a/README.md b/README.md index 9b4e8c9..d07436a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@

NuGet NuGet downloads - .NET 10 + .NET 10 and 11 MIT

@@ -50,7 +50,7 @@ dotnet tool update -g solrevdev.bbx dotnet tool uninstall -g solrevdev.bbx ``` -Requires the [.NET 10 runtime or SDK](https://dotnet.microsoft.com/download). If `bbx` isn't found afterwards, add the tools directory to your `PATH`: +Requires the [.NET 10 or .NET 11 runtime or SDK](https://dotnet.microsoft.com/download). The package carries a build for each. If `bbx` isn't found afterwards, add the tools directory to your `PATH`: ```bash export PATH="$PATH:$HOME/.dotnet/tools" @@ -560,11 +560,12 @@ bbx --help ```bash git clone && cd solrevdev.bbx +# needs the .NET 11 SDK (global.json) and the .NET 10 runtime for the net10.0 tests dotnet build src/Bbx/Bbx.csproj dotnet test tests/Bbx.Tests/Bbx.Tests.csproj -# run without installing -dotnet run --project src/Bbx/Bbx.csproj -f net10.0 -- repo list -w myws +# run without installing; pick a target with -f +dotnet run --project src/Bbx/Bbx.csproj -f net11.0 -- repo list -w myws # install your build globally dotnet pack src/Bbx/Bbx.csproj -c Release diff --git a/global.json b/global.json index cb6c0cd..e26c590 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "10.0.302", - "rollForward": "latestMinor" + "version": "11.0.100", + "rollForward": "latestFeature" } } diff --git a/scripts/smoke.sh b/scripts/smoke.sh index 8d196e5..f8a6056 100755 --- a/scripts/smoke.sh +++ b/scripts/smoke.sh @@ -4,7 +4,7 @@ # # Requirements: # - `bbx` on PATH (either `dotnet tool install -g solrevdev.bbx` or -# `dotnet run --project src/Bbx/Bbx.csproj -f net10.0 --` aliased). +# `dotnet run --project src/Bbx/Bbx.csproj -f net11.0 --` aliased). # - Stored API-token credentials (`bbx auth status` must succeed). This # script will not prompt; run `bbx auth login` first. # - `jq` for quick output sanity checks. diff --git a/src/Bbx/Bbx.csproj b/src/Bbx/Bbx.csproj index 9826583..fee19ca 100644 --- a/src/Bbx/Bbx.csproj +++ b/src/Bbx/Bbx.csproj @@ -6,7 +6,7 @@ is named for the command it provides. --> bbx Bbx - net10.0 + net10.0;net11.0 latest enable enable @@ -22,7 +22,7 @@ - 1.4.4 + 1.5.0 solrevdev diff --git a/tests/Bbx.Tests/Bbx.Tests.csproj b/tests/Bbx.Tests/Bbx.Tests.csproj index 51e4987..0db3e80 100644 --- a/tests/Bbx.Tests/Bbx.Tests.csproj +++ b/tests/Bbx.Tests/Bbx.Tests.csproj @@ -1,7 +1,7 @@ - net10.0 + net10.0;net11.0 latest enable enable From b6155cf6a55e24d5ee06e628d14da9c1b1842061 Mon Sep 17 00:00:00 2001 From: John Smith Date: Thu, 12 Nov 2026 11:24:32 +0000 Subject: [PATCH 2/2] build: make SDK 10 the baseline and add net11.0 only under SDK 11 John wants .NET 10 as the LTS baseline: a machine with only SDK 10 must still build, one with only SDK 11 must build, and one with both must use 11. global.json now asks for 10.0.100 with rollForward latestMajor and no prereleases, so the newest release SDK wins. net11.0 is added only when the SDK is 11 or later, because SDK 10 cannot build it. The published package must carry both targets, so CI lists SDKs 10.0.x and 11.0.x instead of reading global.json: under latestMajor setup-dotnet v5 installs nothing from global-json-file. A new step fails the run if the package lacks either tools/ folder. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_014Mjr3bTLWVmY8sc2j5bcqH --- .github/workflows/publish.yml | 46 ++++++++++++++++++++++++++------ AGENTS.md | 13 +++++++-- CHANGELOG.md | 8 +++--- README.md | 4 ++- global.json | 5 ++-- src/Bbx/Bbx.csproj | 4 ++- tests/Bbx.Tests/Bbx.Tests.csproj | 4 ++- 7 files changed, 66 insertions(+), 18 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9a1fd57..c520c24 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -50,10 +50,13 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - # global.json brings SDK 11, which builds both targets. The net10.0 - # tests still need the .NET 10 runtime, which SDK 11 does not carry. - dotnet-version: 10.0.x - global-json-file: global.json + # Both SDKs are listed, not read from global.json: under latestMajor + # setup-dotnet v5 drops the global.json version and installs + # nothing from it. global.json then rolls forward to SDK 11, which + # builds both targets, and runtime 10 runs the net10.0 tests. + dotnet-version: | + 10.0.x + 11.0.x - name: Restore run: | @@ -69,6 +72,18 @@ jobs: - name: Pack run: dotnet pack "$PROJECT_DIR" --configuration Release --no-build + - name: Check package targets + shell: bash + run: | + set -euo pipefail + # The targets depend on the SDK that built them; fail rather than + # ship a package missing one. + LISTING=$(unzip -l "$NUPKG_DIR"/solrevdev.bbx.*.nupkg) + for tfm in net10.0 net11.0; do + grep -q "tools/$tfm/any/bbx.dll" <<<"$LISTING" \ + || { echo "Package is missing tools/$tfm" >&2; exit 1; } + done + publish: if: github.event_name != 'pull_request' environment: production @@ -85,10 +100,13 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - # global.json brings SDK 11, which builds both targets. The net10.0 - # tests still need the .NET 10 runtime, which SDK 11 does not carry. - dotnet-version: 10.0.x - global-json-file: global.json + # Both SDKs are listed, not read from global.json: under latestMajor + # setup-dotnet v5 drops the global.json version and installs + # nothing from it. global.json then rolls forward to SDK 11, which + # builds both targets, and runtime 10 runs the net10.0 tests. + dotnet-version: | + 10.0.x + 11.0.x - name: Determine and bump version id: bump @@ -184,6 +202,18 @@ jobs: - name: Pack run: dotnet pack "$PROJECT_DIR" --configuration Release --no-build + - name: Check package targets + shell: bash + run: | + set -euo pipefail + # The targets depend on the SDK that built them; fail rather than + # ship a package missing one. + LISTING=$(unzip -l "$NUPKG_DIR"/solrevdev.bbx.*.nupkg) + for tfm in net10.0 net11.0; do + grep -q "tools/$tfm/any/bbx.dll" <<<"$LISTING" \ + || { echo "Package is missing tools/$tfm" >&2; exit 1; } + done + - name: Verify package id: package shell: bash diff --git a/AGENTS.md b/AGENTS.md index 639db3a..71c39df 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -16,13 +16,22 @@ Bitbucket. Output is JSON so scripts and agents can consume it. ## Commands ```bash -dotnet build src/Bbx/Bbx.csproj # net10.0 + net11.0; SDK 11 pinned by global.json -dotnet test tests/Bbx.Tests/Bbx.Tests.csproj # xunit v3, no network; runs both targets +dotnet build src/Bbx/Bbx.csproj # net10.0, plus net11.0 when SDK 11+ is present +dotnet test tests/Bbx.Tests/Bbx.Tests.csproj # xunit v3, no network; every built target dotnet test tests/Bbx.Tests/Bbx.Tests.csproj -f net10.0 # one target only dotnet run --project src/Bbx/Bbx.csproj -f net11.0 -- dotnet pack src/Bbx/Bbx.csproj -c Release ``` +.NET 10 is the LTS baseline. `global.json` asks for SDK `10.0.100` with +`rollForward: latestMajor` and no prereleases, so the newest installed SDK +builds. The target list depends on that SDK: 11 or later builds `net10.0` and +`net11.0`, SDK 10 alone builds `net10.0` only. The published package must carry +both, so CI installs SDKs 10.0.x and 11.0.x explicitly and checks the package +for both `tools/` folders. Do not switch the workflow back to +`global-json-file`: setup-dotnet installs nothing from a `latestMajor` +global.json. + Tests must pass before you commit. They use a fake HTTP handler and never touch the network. Do not add a test that needs credentials. New behaviour ships with a test. diff --git a/CHANGELOG.md b/CHANGELOG.md index d33e829..095393d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,9 +14,11 @@ Versioning follows [Semantic Versioning](https://semver.org/): `MAJOR.MINOR.PATC - The package now targets both `net10.0` and `net11.0`. `RollForward` stays `Major`, so a machine with only a newer runtime still runs it. bbx already ran on .NET 11 through roll-forward, so this is for consistency, not a fix. -- `global.json` now pins SDK `11.0.100` with `rollForward: latestFeature`, so - any 11.0 feature band builds it. Building from source needs the .NET 11 SDK, - and the `net10.0` tests also need the .NET 10 runtime. CI installs both. +- .NET 10 is the LTS baseline for building. `global.json` asks for SDK + `10.0.100` with `rollForward: latestMajor` and `allowPrerelease: false`, so + the newest installed release SDK builds. SDK 11 or later builds both targets; + SDK 10 alone builds `net10.0` only. CI installs SDKs 10.0.x and 11.0.x and + fails if the package is missing either target. ## [1.4.3] diff --git a/README.md b/README.md index d07436a..b140bf7 100644 --- a/README.md +++ b/README.md @@ -560,7 +560,9 @@ bbx --help ```bash git clone && cd solrevdev.bbx -# needs the .NET 11 SDK (global.json) and the .NET 10 runtime for the net10.0 tests +# SDK 10 or later. global.json starts at 10.0.100 and rolls forward to the +# newest installed SDK. SDK 11 builds net10.0 and net11.0; SDK 10 alone builds +# net10.0 only. Testing net10.0 under SDK 11 needs the .NET 10 runtime too. dotnet build src/Bbx/Bbx.csproj dotnet test tests/Bbx.Tests/Bbx.Tests.csproj diff --git a/global.json b/global.json index e26c590..6a28850 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,7 @@ { "sdk": { - "version": "11.0.100", - "rollForward": "latestFeature" + "version": "10.0.100", + "rollForward": "latestMajor", + "allowPrerelease": false } } diff --git a/src/Bbx/Bbx.csproj b/src/Bbx/Bbx.csproj index fee19ca..27d1d3a 100644 --- a/src/Bbx/Bbx.csproj +++ b/src/Bbx/Bbx.csproj @@ -6,7 +6,9 @@ is named for the command it provides. --> bbx Bbx - net10.0;net11.0 + + net10.0 + net10.0;net11.0 latest enable enable diff --git a/tests/Bbx.Tests/Bbx.Tests.csproj b/tests/Bbx.Tests/Bbx.Tests.csproj index 0db3e80..650e64a 100644 --- a/tests/Bbx.Tests/Bbx.Tests.csproj +++ b/tests/Bbx.Tests/Bbx.Tests.csproj @@ -1,7 +1,9 @@ - net10.0;net11.0 + + net10.0 + net10.0;net11.0 latest enable enable