-
Notifications
You must be signed in to change notification settings - Fork 2
Add version bumping infrastructure for devcontainer features (Nushell with nu_plugin_inc) #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add version bumping infrastructure for devcontainer features (Nushell with nu_plugin_inc) #84
Conversation
Co-authored-by: schlich <[email protected]>
Co-authored-by: schlich <[email protected]>
Co-authored-by: schlich <[email protected]>
|
@copilot look into nushell for the main scripting language instead of python. check their documentation for a dedicated version-bumping commands, including in their first-class plugins |
- Add bump-version.nu as primary version bumping tool - Maintain bump-version.py as legacy/compatibility version - Update justfile recipes to use Nushell by default - Add test_bump_version.nu for testing Nushell implementation - Update documentation to explain Nushell benefits - Add NUSHELL_RATIONALE.md explaining the migration Nushell provides better structured data handling, native JSON support, and clearer error messages compared to Python. Co-authored-by: schlich <[email protected]>
I've migrated the version bumping infrastructure to use Nushell as the primary scripting language. Changes in commit 15a7472:
Why Nushell:
Usage: # Using Nushell directly
nu scripts/bump-version.nu --feature just --type patch
# Using just recipes (now defaults to Nushell)
just bump-version just patch
# Python version still available
just bump-version-py just patchBoth versions produce identical results. All tests pass successfully. |
|
@copilot it appears that nushell has a built in version incrementer |
- Add note in bump_semver function explaining inc command is not available - Create NUSHELL_INC_COMMAND.md documenting inc command history and status - Update NUSHELL_RATIONALE.md to reference inc command note - Clarify that custom implementation is used due to inc removal in Nushell 0.80+ The `inc` command was suggested but is not available in current Nushell versions (0.107.0+). Our custom implementation provides the same functionality without relying on deprecated features. Co-authored-by: schlich <[email protected]>
I investigated the Testing with Nushell 0.107.0: $ nu -c '"1.2.3" | inc --patch'
Error: Command `inc` not foundChanges in commit 76ed0f3:
Decision: Keep the custom
All tests continue to pass. Both Nushell and Python implementations produce identical results. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot it appears my grammar was lazy, but it would be preferable to install the |
- Modified bump_semver function to try nu_plugin_inc first - Falls back to custom implementation if plugin not installed - Updated NUSHELL_INC_COMMAND.md with plugin installation instructions - Updated NUSHELL_RATIONALE.md to explain hybrid approach - Updated VERSION_BUMPING.md with plugin setup instructions - Updated scripts/README.md with plugin information The script now prefers the official nu_plugin_inc when available, while maintaining compatibility for environments without the plugin. This provides the best of both worlds: official plugin support with guaranteed functionality. Co-authored-by: schlich <[email protected]>
I've updated the implementation to use the Changes in commit 7c2b8c1:
Plugin Installation: cargo install nu_plugin_inc
nu -c "plugin add ~/.cargo/bin/nu_plugin_inc"Benefits:
The script now prefers the official plugin while maintaining compatibility for all environments. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Summary
Added comprehensive infrastructure for bumping devcontainer feature versions with Nushell as the primary scripting language (using the official
nu_plugin_incplugin) and Python as a legacy option.Latest Update - nu_plugin_inc Integration
Implementation uses a hybrid approach following feedback to use the official Nushell plugin:
nu_plugin_incwhen installed (official Nushell plugin)Plugin Installation (optional but recommended):
cargo install nu_plugin_inc nu -c "plugin add ~/.cargo/bin/nu_plugin_inc"Infrastructure Components
Nushell Script (
scripts/bump-version.nu): Primary toolnu_plugin_incwhen available, custom implementation as fallbackPython Script (
scripts/bump-version.py): Legacy compatibilityJust Recipes: Default to Nushell, with Python variants available
GitHub Workflow: Automated validation on PRs
Comprehensive Documentation:
docs/VERSION_BUMPING.md: User guide with plugin installationdocs/NUSHELL_RATIONALE.md: Why Nushell with hybrid approachdocs/NUSHELL_INC_COMMAND.md: Complete plugin guidescripts/README.md: Quick referenceBenefits
nu_plugin_incwhen available (recommended)Fixes #83
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.