Add version tracking and validation to prevent downgrade issues

Store the last pluginctl version used in plugin.json props and validate
before running commands. Prevents issues when using older pluginctl
versions on plugins modified by newer versions.

- Add Version field to PluginCtlConfig struct
- Implement version validation before command execution
- Add WritePluginManifest and SavePluginCtlConfig helper functions
- Add comprehensive tests for version comparison logic
- Skip validation for 'version' command and when no plugin.json exists

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Felipe M 2025-07-31 11:46:42 +02:00
parent 9d3c6b357f
commit 353cc9efc7
No known key found for this signature in database
GPG key ID: 52E5D65FCF99808A
5 changed files with 286 additions and 51 deletions

View file

@ -54,7 +54,7 @@ checksum:
# Snapshot configuration
snapshot:
version_template: "{{ incpatch .Version }}-next"
version_template: "{{ incpatch .Version }}-{{ .Commit }}"
# Changelog configuration
changelog: