Skip to content

feat(cli): add upgrade system foundation (Sprint 1)#1195

Merged
iammukeshm merged 1 commit intodevelopfrom
feat/cli-upgrade-system
Jan 27, 2026
Merged

feat(cli): add upgrade system foundation (Sprint 1)#1195
iammukeshm merged 1 commit intodevelopfrom
feat/cli-upgrade-system

Conversation

@iammukeshm
Copy link
Member

Summary

This PR adds the foundation for the FSH CLI upgrade system, enabling projects to track their versions and eventually upgrade to newer FSH releases.

Sprint 1 Deliverables

  • Manifest generation - .fsh/manifest.json created during fsh new
  • FshManifest model - Tracks project config, versions, and customizations
  • fsh version command - Shows CLI and project version info
  • fsh upgrade command - Skeleton with --check and --apply flags

New Files

File Purpose
Models/FshManifest.cs Manifest model with JSON serialization
Commands/VersionCommand.cs Display version information
Commands/UpgradeCommand.cs Upgrade command skeleton

Manifest Structure

{
  "fshVersion": "10.0.0",
  "createdAt": "2026-01-27T02:50:00Z",
  "cliVersion": "10.0.0",
  "options": {
    "type": "api-blazor",
    "architecture": "monolith",
    "database": "postgres",
    "modules": ["identity", "multitenancy", "auditing"]
  },
  "tracking": {
    "buildingBlocks": {
      "Core": "10.0.0",
      "Web": "10.0.0",
      "Persistence": "10.0.0",
      "Infrastructure": "10.0.0"
    },
    "customizations": []
  }
}

Next Steps

  • Sprint 2: GitHub API integration for release fetching, version comparison
  • Sprint 3: Package updater, interactive diff viewer
  • Sprint 4: Polish + fsh add module command

Testing

# Create a new project (generates manifest)
fsh new TestApp --preset quickstart

# Check version info
fsh version --path ./TestApp

# See upgrade command help
fsh upgrade
- Add FshManifest model for tracking project configuration and versions
- Generate .fsh/manifest.json during project scaffolding
- Add 'fsh version' command to show CLI and project versions
- Add 'fsh upgrade' command skeleton with --check and --apply flags

Sprint 1 deliverables:
- [x] Manifest generation in SolutionGenerator
- [x] FshManifest model with JSON serialization
- [x] VersionCommand with table and JSON output
- [x] UpgradeCommand skeleton with planned functionality preview

The manifest tracks:
- FSH framework version used
- CLI version that created the project
- Project options (type, architecture, database, modules)
- Building blocks versions for upgrade detection

Part of the CLI upgrade system - Sprint 2 will add GitHub API
integration for checking available upgrades.
@iammukeshm iammukeshm force-pushed the feat/cli-upgrade-system branch from 2f29689 to a9817bd Compare January 27, 2026 03:12
@iammukeshm iammukeshm merged commit a3f29e7 into develop Jan 27, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant