Migration Guide v2.0.0
Upgrading from v1.x to v2.0.0 with multi-file version support.
⚠️ Breaking Change in v2.0.0
Version 2.0.0 introduces a new configuration format for version.files. While existing string-based configurations remain compatible, the internal type system has changed.
What Changed
The version.files configuration now supports both simple strings and detailed objects:
Before (v1.x)
version:
files:
- "package.json"
tagPrefix: "v"
After (v2.0.0)
version:
files:
- "package.json" # Still works!
- "pyproject.toml" # NEW: Python support
- path: "helm/values.yaml" # NEW: Object format
key: "image.tag"
prefix: ""
tagPrefix: "v"
syncCheck: true # NEW: Version sync validation
New Features in v2.0.0
1. Python Support (pyproject.toml)
Shipmark now automatically detects and updates versions in Python projects:
- PEP 621:
[project].version - Poetry:
[tool.poetry].version - Setuptools:
[tool.setuptools].version
version:
files:
- "pyproject.toml"
2. YAML Support with Configurable Key Path
Update versions in Helm values, Kubernetes manifests, or any YAML file:
version:
files:
- path: "helm/values.yaml"
key: "image.tag" # Dot notation for nested keys
prefix: "" # No "v" prefix for Docker tags
3. Version Sync Check
Enable syncCheck to validate that all version files are in sync before releasing:
version:
files:
- "package.json"
- "pyproject.toml"
syncCheck: true
If versions differ, Shipmark will warn you and ask for confirmation:
4. Improved Dry-Run Output
The --dry-run flag now shows all files that would be updated:
Migration Steps
Step 1: Update Shipmark
Step 2: Review Your Configuration
Your existing .shipmarkrc.yml should still work. No changes required for basic usage.
Optionally, add new file types:
# .shipmarkrc.yml
version:
files:
- "package.json" # Existing - still works
- "pyproject.toml" # Add if you have Python
- path: "deploy/values.yaml" # Add for Helm/K8s
key: "image.tag"
prefix: ""
syncCheck: true # Recommended for multi-file
Step 3: Test with Dry-Run
Verify that all your version files are detected and would be updated correctly.
Backwards Compatibility
| Configuration | v1.x | v2.0.0 |
|---|---|---|
files: ["package.json"] |
✓ Works | ✓ Works |
files: ["pyproject.toml"] |
✗ Not supported | ✓ Works |
Object format with path/key |
✗ Not supported | ✓ Works |
syncCheck option |
✗ Not available | ✓ Available |
Use Cases
React + Python Monorepo
version:
files:
- "frontend/package.json"
- "backend/pyproject.toml"
syncCheck: true
Node.js + Helm Deployment
version:
files:
- "package.json"
- path: "deploy/helm/values.yaml"
key: "image.tag"
prefix: "" # Docker tags without "v"
syncCheck: true
Full Stack with Multiple Deploy Targets
version:
files:
- "package.json"
- "pyproject.toml"
- path: "k8s/deployment.yaml"
key: "spec.template.spec.containers[0].image"
prefix: "myapp:"
- path: "docker-compose.yml"
key: "services.app.image"
prefix: "myapp:"
syncCheck: true
Need Help?
If you encounter any issues during migration:
- Check the Configuration Reference for all options
- Open an issue on GitHub
- Review the Changelog for detailed changes