Versioning System
December 30, 2025 · View on GitHub
This repository uses an automated versioning system that increments the version number on every merge to the main or master branch.
How It Works
Version Storage
- The current version is stored in the
lib/VERSIONfile - The version follows semantic versioning format:
MAJOR.MINOR.PATCH(e.g.,1.0.0)
Automatic Increment
- When a PR is merged to
mainormaster, the GitHub Actions workflow.github/workflows/version-increment.ymlautomatically:- Reads the current version from the
lib/VERSIONfile - Increments the PATCH version by 1
- Updates the
lib/VERSIONfile - Commits the change with message
chore: bump version to X.Y.Z [skip ci] - Creates and pushes a Git tag
vX.Y.Z
- Reads the current version from the
Version Display
The version is displayed in the application headers:
-
App Control Panel: Shows version alongside the server IP address
🧩 App Control Panel | 192.168.1.100 | v1.0.0 -
Server Control Panel: Shows version alongside the server IP address
🖥️ Server Control Panel | 192.168.1.100 | v1.0.0
Implementation Details
Files
lib/VERSION- Stores the current version numberlib/version.sh- Contains version-related functions:get_app_version()- Returns the raw version numberformat_version_display()- Returns the formatted version (e.g.,v1.0.0)
.github/workflows/version-increment.yml- GitHub Actions workflow for auto-incrementing
Testing
Unit tests for the versioning system are located in test/version_tests.sh and include:
- Version file existence check
- Version format validation (semantic versioning)
- Version reading functionality
- Version display formatting
Run version tests:
./test/version_tests.sh
Manual Version Updates
If you need to manually update the version (e.g., for MAJOR or MINOR version bumps):
- Edit the
lib/VERSIONfile directly - Commit the change
- Create a tag manually if desired:
git tag vX.Y.Z git push origin vX.Y.Z
Note: The automatic increment workflow will continue from your manually set version.
Skip Version Increment
To prevent the workflow from running (e.g., for documentation-only changes), include [skip ci] in your commit message. However, note that merges to main/master will still trigger the workflow unless the merge commit itself contains [skip ci].