Implement minor version system for template management

- Add major.minor version format (30.1)
- Keep government version as major number (30)
- Use minor version for fixes and improvements (.1, .2, .3)
- Update manifest.json with minor version system
- Add practical examples to maintenance manual
- Enable automatic updates for template fixes
- Maintain government version compliance
This commit is contained in:
Frank Cools 2025-10-08 01:26:12 +02:00
parent e8cbd9b3df
commit c471defd25
3 changed files with 45 additions and 6 deletions

View File

@ -109,8 +109,9 @@ git push origin main
- **Field Changes**: When form fields are added, removed, or modified
### Version Number Guidelines
- **Keep Government Version**: Use the official government version number (e.g., "30")
- **Don't Increment Unnecessarily**: Only change version if the template actually changes
- **Major Version**: Use the official government version number (e.g., "30")
- **Minor Version**: Use for fixes and improvements (e.g., "30.1", "30.2")
- **Format**: `major.minor` (e.g., "30.1" for government version 30 with fixes)
- **Document Changes**: Always document what changed in the commit message
### Version Update Process
@ -118,6 +119,38 @@ git push origin main
2. **If changed**: Update version numbers in both files
3. **If unchanged**: Just replace the file, keep same version
### Minor Version System
The system uses a `major.minor` version format:
- **Major Version (30)**: Official government version
- **Minor Version (.1, .2, .3)**: Your fixes and improvements
**Examples:**
- `30.0` - Original government template
- `30.1` - Government template + field fixes
- `30.2` - Government template + additional improvements
- `31.0` - New government template (when available)
**Benefits:**
- ✅ Keep government version as major number
- ✅ Track your improvements with minor numbers
- ✅ Other installations get automatic updates
- ✅ Clear version history
### Practical Example
**Scenario**: You need to fix field positioning in the official template
1. **Current version**: `30.1`
2. **Fix the template**: Update PDF file with corrected fields
3. **Update version**: Change to `30.2`
4. **Update manifest**: Add new release entry for `30.2`
5. **Commit and push**: All installations will auto-update to `30.2`
**Result**:
- Government version stays `30` (major)
- Your fixes are tracked as `30.2` (minor)
- All installations get the improved template automatically
---
## 📁 File Structure

View File

@ -62,9 +62,9 @@ class DeclarationTVA_PDF
public $template_path;
/**
* @var string Template version
* @var string Template version (major.minor format)
*/
public $template_version = '30';
public $template_version = '30.1';
/**
* @var string Template document number

View File

@ -1,7 +1,7 @@
{
"templates": {
"ca3": {
"current_version": "30",
"current_version": "30.1",
"document_number": "10963*30",
"description": "Official CA-3 VAT Declaration Template",
"releases": {
@ -9,7 +9,13 @@
"download_url": "https://git.covago.com/frank/DeclarationTVA/raw/branch/main/templates/declarationtva/ca3_official_template.pdf",
"checksum": "sha256:placeholder_checksum_here",
"release_date": "2025-01-27",
"description": "Official CA-3 template version 30"
"description": "Official CA-3 template version 30 (government version)"
},
"30.1": {
"download_url": "https://git.covago.com/frank/DeclarationTVA/raw/branch/main/templates/declarationtva/ca3_official_template.pdf",
"checksum": "sha256:placeholder_checksum_here",
"release_date": "2025-01-27",
"description": "CA-3 template version 30.1 (field fixes and improvements)"
}
}
}