Skip to content

feat(globaltool)!: PR-B — thin shims + local tool manifest + workflow regen (#203) - #204

Merged
ChrisonSimtian merged 1 commit into
mainfrom
feature/203-pr-b-thin-shims-and-tool-manifest
May 26, 2026
Merged

feat(globaltool)!: PR-B — thin shims + local tool manifest + workflow regen (#203)#204
ChrisonSimtian merged 1 commit into
mainfrom
feature/203-pr-b-thin-shims-and-tool-manifest

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

Summary

Second of three PRs from #203. PR-A (#201) shipped the in-tool runner; this PR cuts THIS repo over to thin shims, regenerates the workflows, and updates the framework so downstream consumers re-generating with v11+ get the new shape.

Breaking change: [GitHubActions] generator now emits 3 steps (setup-dotnet + tool restore + dotnet fallout) instead of one ./{BuildCmdPath} {targets} line. Downstream consumers need a .config/dotnet-tools.json with Fallout.GlobalTool pinned for their next workflow regen to be runnable in CI.

This repo's cutover

  • .config/dotnet-tools.json — pins Fallout.GlobalTool 10.3.37 (the version just published from feat(globaltool): add in-tool build runner (PR-A of bootstrapper deprecation) #201's merge).
  • build.sh / build.ps1 — thin (~60 lines each): kept the dotnet provisioning block verbatim, dropped the BUILD_PROJECT_FILE config + explicit dotnet build/dotnet run --project lines, end with tool restore + dotnet fallout "$@".
  • build.cmd — deleted (was a one-line dispatcher to build.ps1).
  • .github/workflows/{ubuntu,windows,macos}-latest.yml — regenerated to the new 3-step shape.
  • .github/workflows/release.yml — hand-written (kept that way per its header comment); updated to the same shape with the existing NuGetApiKey / GITHUB_TOKEN env mapping preserved.

Framework changes

  • Fallout.Common/CI/GitHubActions/Configuration/GitHubActionsRunStep.cs — rewritten to emit 3 steps; drops the BuildCmdPath field.
  • Fallout.Common/CI/GitHubActions/GitHubActionsAttribute.cs — stops passing BuildCmdPath to the run step.
  • Fallout.Build/CICD/ConfigurationAttributeBase.cs — softens BuildCmdPath to fall back to "build.cmd" instead of asserting when no file is found. Keeps the legacy CI providers (AzurePipelines, AppVeyor, TeamCity, SpaceAutomation) functional for consumers who still have build.cmd, without forcing this repo to keep one. Those providers are dormant / dead-code per Multi-provider CI revival — gather demand for Azure / GitLab / TeamCity / AppVeyor support #8.
  • Fallout.Build/Utilities/SchemaUtility.cs — injects a synthetic BuildProjectFile (optional string, with description) into the FalloutBuild base schema. Editors now offer IntelliSense for the BuildProjectFile field that BuildProjectResolver reads from .fallout/parameters.json.
  • Fallout.GlobalTool/Program.Setup.cs (WriteBuildScripts) — drops build.cmd emission, emits the thin templates, creates .config/dotnet-tools.json (skipped if one already exists — consumer may have other tools pinned). Drops the now-unused BuildDirectory / BuildProjectName token substitutions in shim templates.
  • New template Fallout.GlobalTool/templates/dotnet-tools.json with _FALLOUT_GLOBAL_TOOL_VERSION_ filled at :setup time from the running tool's own assembly version.

Test updates

  • SchemaUtilityTest.Test*.verified.json (×4) — add BuildProjectFile after Verbosity.
  • CompletionUtilityTest.TestGetCompletionItems{Target,Parameter}Build.verified.txt — add BuildProjectFile: [] in alphabetical position.
  • ConfigurationGenerationTest.Test_testName={simple,detailed}-triggers_attribute=GitHubActionsAttribute.verified.txt — expect the new 3-step shape.
  • .fallout/build.schema.json — regenerated by the build's own HandleShellCompletionAttribute.

Verification

Locally on Windows:

  • dotnet test tests/Fallout.Build.Tests/ — 23/23 passed (schema + completion utility tests).
  • dotnet test tests/Fallout.Common.Tests/ --filter ConfigurationGenerationTest — 6/6 passed.
  • dotnet test tests/Fallout.GlobalTool.Tests/ — 17/17 passed.
  • End-to-end thin-shim cycle: dotnet tool restore resolved Fallout.GlobalTool 10.3.37 from nuget.org, dotnet fallout dispatched into the in-tool runner, which built + ran _build.csproj with the new framework code.

Backwards compatibility

Scenario Behaviour
Existing consumer repo with old fat build.sh / build.ps1, no v11 changes Works unchanged. Their shims do their own dotnet build + dotnet run --project; the global tool isn't on their critical path.
Existing consumer repo upgrading to Fallout.GlobalTool v11 and running fallout :setup :setup overwrites their build.sh / build.ps1 with thin shims, drops build.cmd, and (if they don't already have one) creates .config/dotnet-tools.json. They commit those changes.
Existing consumer repo that regens [GitHubActions] workflows Workflows now emit the 3-step shape. They need .config/dotnet-tools.json for CI to pass. If they re-run :setup first, it's created automatically; otherwise they add it manually.
Consumer who uses other CI providers (AzurePipelines, AppVeyor, TeamCity, SpaceAutomation) Unchanged. Those generators still emit ./build.cmd-style invocations and still need build.cmd in the consumer's repo.
Consumer who already has a .config/dotnet-tools.json with other tools pinned :setup does NOT overwrite. They need to add the fallout.globaltool entry manually (or run dotnet tool install Fallout.GlobalTool from their repo root, which merges into the existing manifest).

Not in scope (follow-up)

  • Program.cs Build() method left alive (one bootstrap caller in Program.Complete.cs); shim hop is now redundant but harmless. Cleanup tracked separately.
  • Docs sweep tracked in Docs CLI cleanup: replace stale nuke references with fallout across docs/ #198 (PR-C).
  • Fallout.Common.targets could surface .config/dotnet-tools.json in the IDE "boot" link group alongside build.sh/build.ps1. Cosmetic; deferred.

Test plan

  • ubuntu-latest (the only PR gate) goes green — exercises the new 3-step workflow shape end-to-end (setup-dotnettool restore resolves Fallout.GlobalTool 10.3.37 from nuget.org → dotnet fallout Test Pack round-trips through the in-tool runner).
  • Post-merge, watch windows-latest and macos-latest runs on main — they exercise the same shape on the other two platforms.
  • Post-merge, the release pipeline pushes a new Fallout.GlobalTool version with PR-B's framework changes. PR-C (docs sweep, Docs CLI cleanup: replace stale nuke references with fallout across docs/ #198) can land any time after.

Refs

…PR-B of #203)

Second of three PRs that make `Fallout.GlobalTool` (`fallout`) the canonical
entry point for running builds. PR-A (#201) shipped the in-tool runner.
This PR cuts THIS repo over to thin shims, regenerates the workflows, and
updates the framework so downstream consumers re-generating with v11+ also
get the new shape.

## Breaking changes

- **`[GitHubActions]` generator now emits 3 steps** instead of one
  `./{BuildCmdPath} {targets}` line:
    1. `actions/setup-dotnet@v4` with `global-json-file: global.json`
    2. `dotnet tool restore`
    3. `dotnet fallout {targets}`
  Downstream consumers' next `--generate-configuration` run will produce
  the new shape. They need `.config/dotnet-tools.json` with `Fallout.GlobalTool`
  pinned, or `dotnet tool restore` fails in CI.

- **`build.cmd` deleted** from this repo (both root and from the `:setup`
  scaffolder template). Was a one-line dispatcher to `build.ps1`; no longer
  needed now that `dotnet fallout` is the entry point everywhere.

## This repo's cutover

- `.config/dotnet-tools.json` — new, pins `Fallout.GlobalTool` 10.3.37 (the
  version just published from #201).
- `build.sh` / `build.ps1` — thin (~60 lines each): keep the dotnet
  provisioning block verbatim (for the rare case `dotnet` isn't installed),
  end with `tool restore` + `dotnet fallout "$@"`.
- `.github/workflows/{ubuntu,windows,macos}-latest.yml` — regenerated to the
  3-step shape.
- `.github/workflows/release.yml` — hand-written (kept that way per its
  header comment); updated to the same 3-step shape with the existing
  `NuGetApiKey` / `GITHUB_TOKEN` env mapping preserved.

## Framework changes

- `Fallout.Common/CI/GitHubActions/Configuration/GitHubActionsRunStep.cs`:
  rewritten to emit 3 steps; drops the `BuildCmdPath` field.
- `Fallout.Common/CI/GitHubActions/GitHubActionsAttribute.cs`: stops passing
  `BuildCmdPath` to the run step.
- `Fallout.Build/CICD/ConfigurationAttributeBase.cs`: softens `BuildCmdPath`
  to fall back to `"build.cmd"` instead of asserting when no file is found —
  keeps the legacy CI providers (AzurePipelines, AppVeyor, TeamCity,
  SpaceAutomation) functional for consumers who still have `build.cmd`,
  without forcing this repo to keep one.
- `Fallout.Build/Utilities/SchemaUtility.cs`: injects a synthetic
  `BuildProjectFile` (optional string) into the `FalloutBuild` base schema
  so editors offer IntelliSense for the `BuildProjectFile` field the
  in-tool runner reads from `.fallout/parameters.json`.
- `Fallout.GlobalTool/Program.Setup.cs` (`WriteBuildScripts`): drops the
  `build.cmd` emission, emits the thin `build.sh` / `build.ps1` templates,
  and creates `.config/dotnet-tools.json` (skipped if one already exists —
  consumer may have other tools pinned).
- New template `Fallout.GlobalTool/templates/dotnet-tools.json` with a
  `_FALLOUT_GLOBAL_TOOL_VERSION_` placeholder filled at `:setup` time from
  the running tool's own assembly version.

## Test updates

- `SchemaUtilityTest.Test*.verified.json` (×4): add `BuildProjectFile`
  property after `Verbosity`.
- `CompletionUtilityTest.TestGetCompletionItems{Target,Parameter}Build.verified.txt`:
  add `BuildProjectFile: []` in alphabetical position.
- `ConfigurationGenerationTest.Test_testName={simple,detailed}-triggers_attribute=GitHubActionsAttribute.verified.txt`:
  expect the new 3-step shape.
- `.fallout/build.schema.json` regenerated by the build's own
  `HandleShellCompletionAttribute`.

All affected test projects pass locally (`Fallout.Build.Tests`,
`Fallout.Common.Tests`, `Fallout.GlobalTool.Tests`).

## Not in scope (follow-up)

- `Program.cs` `Build()` method is still alive — called once from
  `Program.Complete.cs` for the bootstrap completion path. Now that shims
  are thin (themselves calling `dotnet fallout`), this is just a slightly
  longer subprocess hop than necessary; safe but redundant. Removal can
  follow once we're confident nothing else depends on the shim shape.
- Docs sweep tracked in #198 (PR-C).
- `Fallout.Common.targets` could surface `.config/dotnet-tools.json` in the
  IDE "boot" link group alongside `build.sh`/`build.ps1`; cosmetic, deferred.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ChrisonSimtian
ChrisonSimtian merged commit 07e8535 into main May 26, 2026
1 check passed
@ChrisonSimtian
ChrisonSimtian deleted the feature/203-pr-b-thin-shims-and-tool-manifest branch May 26, 2026 23:13
ChrisonSimtian added a commit that referenced this pull request May 26, 2026
Closes #198 and completes PR-C of #203.

## Scope

Two related sweeps in one PR:

1. **CLI/brand rebrand (closes #198)**: replace stale `nuke` CLI command
   examples with `fallout` across `docs/`, switch `.nuke` directory-marker
   references to `.fallout`, rebrand "NUKE provides/comes/has/integrates"
   phrasing to "Fallout …" where it describes the current product (not the
   historical project), update namespace examples (`Nuke.Common.Tools.*` →
   `Fallout.Common.Tools.*`, `Nuke.GlobalTool` → `Fallout.GlobalTool`),
   and update MSBuild property names (`NukeRootDirectory` →
   `FalloutRootDirectory`, with the legacy names called out as still-honoured).
2. **New shim shape (PR-C of #203)**: update CONTRIBUTING.md, CLAUDE.md,
   `docs/01-getting-started/02-setup.md`, `docs/01-getting-started/03-execution.md`,
   and `docs/05-cicd/github-actions.md` to describe the thin shims +
   local-tool-manifest pattern PR-B introduced: drop `build.cmd` from
   examples, document the new 3-step GitHub Actions shape (`actions/setup-dotnet`
   → `dotnet tool restore` → `dotnet fallout`), describe `.config/dotnet-tools.json`.

## What's NOT touched

- `docs/rebrand-plan.md` — intentionally NUKE-named throughout (it's the
  rebrand plan).
- `docs/migration/from-nuke.md` — migration framing needs both names.
- The `Nuke.<X>` namespace mentions inside `docs/rebrand-plan.md`'s mapping
  tables and the bridge-package strategy section.
- Historical references like "upstream NUKE issue #822" and "the original
  NUKE key was matkoch-owned" — these cite the upstream project and need
  to stay accurate.
- `CHANGELOG.md`, `src/Fallout.Migrate.Analyzers/README.md`, and other
  package READMEs that reference the historical NUKE project for migration
  context.

## Files changed

22 docs + CONTRIBUTING.md + CLAUDE.md.

Most edits are mechanical text substitutions; the substantive rewrites are:

- `docs/01-getting-started/02-setup.md`: new file structure example
  (drops `build.cmd`, adds `.config/dotnet-tools.json` and `.fallout/`),
  new note explaining the thin-shim role, MSBuild property names updated.
- `docs/01-getting-started/03-execution.md`: thin-shim explanation in the
  Global Tool / Windows / Linux tab block; all `nuke <target>` /
  `nuke --help` / `nuke --plan` / etc. switched to `fallout`.
- `docs/05-cicd/github-actions.md`: generated-output YAML examples updated
  to the 3-step shape; cache-step `actions/cache@v2` bumped to `@v4` with
  the current key files; upload-artifact `@v1` bumped to `@v5` to match
  the actual generator output; new note explaining the `dotnet-tools.json`
  requirement.
- `docs/06-global-tool/00-shell-completion.md`: shell completion scripts
  rebranded (command name + function names: `_nuke_zsh_complete` →
  `_fallout_zsh_complete`, etc.).
- `docs/06-global-tool/03-navigation.md`: navigation function names
  rebranded (`nuke.` → `fallout.`, etc.).

## Verification

- Edits don't change link targets, only prose and code examples.
- Docusaurus `onBrokenLinks: 'throw'` will catch any regression at deploy
  time. PR-C is docs-only and hits the noop `ubuntu-latest-docs.yml`
  workflow so the GitHub PR check stays green.

## Refs

- Closes #198 (docs CLI cleanup).
- Completes PR-C of #203 (bootstrapper-deprecation plan). PR-A (#201) and
  PR-B (#204) are already merged.
- Companion issue #199 (CLI alias bridge guide for migrating users) is a
  separate enhancement, not in scope here.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ChrisonSimtian added a commit that referenced this pull request May 27, 2026
… CLAUDE.md

Three breaking changes shipped under 10.3.x patch releases over the
past two days:

  - #206 chore(globaltool)!: rename Fallout.GlobalTool → Fallout.Cli
  - #204 feat(globaltool)!: thin shims + local tool manifest, drop build.cmd
  - #212 fix(security)!:  AES-GCM v2 secret format with per-secret salt+nonce

CHANGELOG.md has had an `[Unreleased] — 11.0` heading with extensive
breaking-change entries since the takeover (STJ migration, schema
rewrite, etc.), but `version.json` stayed pinned at 10.3 and every
release shipped as 10.3.x. Net effect: consumers updating from
10.3.40 → 10.3.45 silently inherited a package rename and a secret-
format change — exactly the failure mode semver exists to prevent.

This PR bumps `version.json` to 11.0 so the next release becomes
11.0.x. The 10.3.x releases on nuget.org are already published and
stay where they are; this PR stops the bleeding from this point
forward.

Also adds a **Semver policy** section to CLAUDE.md so the rule is
explicit and reviewer-enforceable:

  - Any `!` commit (or flagged breaking change) requires bumping
    the major in `version.json` in the same PR.
  - Patch increments from git-height are reserved for non-breaking
    fixes.
  - Reviewer responsibility: block merge until the bump is in.
  - Add a CHANGELOG.md entry under `[Unreleased] — <next-major>`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ChrisonSimtian added a commit that referenced this pull request May 27, 2026
… CLAUDE.md (#220)

Three breaking changes shipped under 10.3.x patch releases over the
past two days:

  - #206 chore(globaltool)!: rename Fallout.GlobalTool → Fallout.Cli
  - #204 feat(globaltool)!: thin shims + local tool manifest, drop build.cmd
  - #212 fix(security)!:  AES-GCM v2 secret format with per-secret salt+nonce

CHANGELOG.md has had an `[Unreleased] — 11.0` heading with extensive
breaking-change entries since the takeover (STJ migration, schema
rewrite, etc.), but `version.json` stayed pinned at 10.3 and every
release shipped as 10.3.x. Net effect: consumers updating from
10.3.40 → 10.3.45 silently inherited a package rename and a secret-
format change — exactly the failure mode semver exists to prevent.

This PR bumps `version.json` to 11.0 so the next release becomes
11.0.x. The 10.3.x releases on nuget.org are already published and
stay where they are; this PR stops the bleeding from this point
forward.

Also adds a **Semver policy** section to CLAUDE.md so the rule is
explicit and reviewer-enforceable:

  - Any `!` commit (or flagged breaking change) requires bumping
    the major in `version.json` in the same PR.
  - Patch increments from git-height are reserved for non-breaking
    fixes.
  - Reviewer responsibility: block merge until the bump is in.
  - Add a CHANGELOG.md entry under `[Unreleased] — <next-major>`.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ChrisonSimtian added a commit that referenced this pull request May 27, 2026
…l→Cli migration guide (#225)

Closes the two follow-ups noted in #220's PR body — the v11 record now
covers every breaking change that shipped under 10.3.x and were
catalysed by the semver-policy fix.

CHANGELOG.md — three new entries under [Unreleased] — 11.0, most-recent
first:
  - #214 AES-GCM v2 secret format
  - #206 Fallout.GlobalTool → Fallout.Cli package rename
  - #204 thin shims + dotnet-tools manifest + GitHubActions generator
        regen (PR-B of #203)

docs/migration/from-globaltool-to-cli.md — focused migration guide
covering the three consumer scenarios (global install, local manifest,
shims) plus the affected-versions table noting both the renamed
Fallout.GlobalTool freeze at 10.3.40 and the 10.3.41-47 Fallout.Cli
unlist done via tools/Unlist-NugetPackage.ps1.
ChrisonSimtian added a commit that referenced this pull request May 29, 2026
Wires release/v10.3's release workflow to fire on push to the branch
(was push:main, which never triggers here) plus manual dispatch, and
binds it to the nuget-org Environment so the env-scoped NUGET_API_KEY
(#273) resolves and the required-reviewer approval gate runs before any
nuget.org push.

Merging this PR is the inaugural release-from-release/vN run: it builds
the clean #170 code as the stable 10.3.48 marker and publishes it.

Keeps the #170-era './build.cmd Test Pack Publish' invocation (local
'dotnet fallout' tool didn't exist until #204, after this branch point).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ChrisonSimtian added a commit that referenced this pull request May 29, 2026
* chore(release): stage clean 10.3.48 marker on release/v10.3

release/v10.3 is parked at the last clean commit (#170 == git-height 23,
i.e. 10.3.23 code). The contaminated 10.3.24-47 patches are being
unlisted from nuget.org. This stages a fresh CLEAN marker above them:

- versionHeightOffset: 24  -> height 24 (this commit) + 24 = patch 48
- publicReleaseRefSpec gains ^refs/heads/release/v10.3$ so a build ON
  release/v10.3 is a STABLE public release (10.3.48), not a -preview.

No publish here. The actual 10.3.48 push to nuget.org is a separate
operation with a push-scoped key.

VERIFY before publishing: 'nbgv get-version' on release/v10.3 must
report 10.3.48 (NOT 10.3.25 — which would mean the offset reset height
and collide with a contaminated version).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* ci(release): publish the 10.3.x channel from release/v10.3 on merge

Wires release/v10.3's release workflow to fire on push to the branch
(was push:main, which never triggers here) plus manual dispatch, and
binds it to the nuget-org Environment so the env-scoped NUGET_API_KEY
(#273) resolves and the required-reviewer approval gate runs before any
nuget.org push.

Merging this PR is the inaugural release-from-release/vN run: it builds
the clean #170 code as the stable 10.3.48 marker and publishes it.

Keeps the #170-era './build.cmd Test Pack Publish' invocation (local
'dotnet fallout' tool didn't exist until #204, after this branch point).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant