Tags: linkdotnet/Blog
Tags
Add automated upgrade assistant for appsettings.json migrations (#463) * Add Upgrade Assistant tool for appsettings.json migration - Created LinkDotNet.Blog.UpgradeAssistant console tool in tools folder - Implemented migration framework with version tracking - Added migrations for 8.0→9.0, 9.0→11.0, and 11.0→12.0 - Colorful console output using ANSI colors - Automatic backup functionality with timestamps - Dry-run mode to preview changes - Comprehensive documentation in docs/Migrations/UpgradeAssistant.md - Updated MIGRATION.md to reference the new tool - Added ConfigVersion field to appsettings.json - Added backups/ to .gitignore Co-authored-by: linkdotnet <[email protected]> * Add unit tests for Upgrade Assistant - Created test project LinkDotNet.Blog.UpgradeAssistant.Tests - Added comprehensive tests for Migration8To9, Migration9To11, Migration11To12 - Added tests for MigrationManager including end-to-end scenarios - All 17 tests passing Co-authored-by: linkdotnet <[email protected]> * Address code review feedback - Remove OutputType from test project csproj - Fix document disposal pattern in MigrationManager - Use separate variable for each migration document Co-authored-by: linkdotnet <[email protected]> * Address PR feedback - use Spectre.Console, remove old migrations, skip appsettings.json - Replace CommandLineParser with Spectre.Console for CLI and colorful output - Remove Migration_8_To_9 and Migration_9_To_11 (current version is 11.0) - Make CurrentVersion dynamic based on highest ToVersion from migrations - Skip version-controlled appsettings.json file during migration - Update tests to reflect changes (9 tests passing) - Enhanced help and version output with Figlet text and tables Co-authored-by: linkdotnet <[email protected]> * Add projects to solution and remove unnecessary comments - Added LinkDotNet.Blog.UpgradeAssistant and LinkDotNet.Blog.UpgradeAssistant.Tests to LinkDotNet.Blog.sln - Removed inline comments from code, using descriptive method names instead - Extracted ParseCommandLineArguments method for better code organization - Created DetermineCurrentVersionFromMigrations and IsVersionControlledAppsettingsFile methods - Kept only XML documentation comments (///) which are standard - All tests passing (9/9) Co-authored-by: linkdotnet <[email protected]> * Add Automated Migration documentation to README files - Added chapter about Automated Configuration Migration (Version 12+) in docs/Migrations/Readme.md - Documented Upgrade Assistant features, usage examples, and benefits - Added "Automated Configuration Migration" as a feature in main Readme.md - Provided clear migration path: automated for v12+, manual for pre-v12 Co-authored-by: linkdotnet <[email protected]> * docs: Add clarification and cleanup * docs: Add readme * fix: Build errors --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: linkdotnet <[email protected]> Co-authored-by: Steven Giesel <[email protected]>
PreviousNext