Skip to content

[P5] Build Fallout.Migrate CLI tool — automated NUKE → Fallout repo migration #48

Description

@ChrisonSimtian

Implementation issue spun off from #35 (bridge strategy).

Goal

Ship a dotnet tool that migrates an existing NUKE consumer repo to Fallout in one command:

dotnet tool install -g Fallout.Migrate
cd path/to/my-nuke-repo
fallout-migrate

After the tool exits, ./build.ps1 should compile and run identically against Fallout.

What it must do

Step Action
1 Detect _build.csproj (or equivalent build orchestrator project)
2 Rewrite PackageReference Include="Nuke.*"Fallout.*
3 Rewrite using Nuke.* directives → using Fallout.* across all .cs files
4 Rewrite attribute references where namespace import differs ([GitHubActions(...)] etc.)
5 Rewrite bootstrap scripts: dotnet nukedotnet fallout in build.ps1, build.sh, build.cmd
6 Detect .nuke/ directory and (depending on the [P2] decision in #29) leave it, rename it, or migrate config
7 Detect CI YAML files generated by NUKE and offer to regenerate (don't auto-rewrite — they're idempotent on next Fallout build)
8 Print a summary: files changed, manual follow-ups needed, link to migration guide (#37)

Non-goals

  • Not a general C# refactor tool — scope limited to NUKE → Fallout migration patterns.
  • Not a replacement for the Roslyn codefix ([P5] Build Roslyn codefix for Nuke.* → Fallout.* using directives #36) — the codefix is for in-IDE per-file fixes; this CLI is for whole-repo bulk migration.
  • Not a replacement for the shim packages — the CLI does a clean cutover; shims are for projects that can't migrate yet.

Implementation approach

  • New project: source/Fallout.Migrate/Fallout.Migrate.csproj, packaged as <PackAsTool>true</PackAsTool>.
  • Reuse the existing Cake-rewriting infrastructure in source/Nuke.GlobalTool/Rewriting/Cake/ as a template — it already does AST-level rewrites with Roslyn.
  • Test fixtures: a tests/ directory of mock "pre-migration NUKE repos" and their expected post-migration state. Verify via Verify.Xunit snapshots, matching the rest of the project's testing conventions.

Done when

  • CLI builds and packs as a dotnet tool
  • Migrates a vanilla _build.csproj (DotNet only) test fixture cleanly
  • Migrates a complex multi-CI test fixture (GitHub Actions + custom attributes) cleanly
  • Tested on a real external NUKE consumer repo (volunteer needed)
  • Published to GitHub Packages
  • Linked from [P5] Write NUKE → Fallout migration guide #37 migration guide

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions