Repository navigation
Version: MAJOR.MINOR.PATCH, bump rule and CI check #44
Copy link
Copy link
Closed
Labels
uniRelease naming and management, common across the repositoriesRelease naming and management, common across the repositories
Description
Goal
Move vtesse from MAJOR.MM (1.12) to MAJOR.MINOR.PATCH and add a CI check that a code change comes with a new version.
Changes
include/vtesse/version.h:VTESSE_VERSION "1.12"→ the next version in the new form (1.12.1for a fix,1.13.0for a feature) in the pull request that next changes code. Ordering stays:1.12<1.12.1<1.13.0. The release title becomesVTesse 1.12.1.- Android
versionCode(android/app/build.gradle.kts:9-10): todayMAJOR*100+MM(112). New formulaMAJOR*10000 + MINOR*100 + PATCH(1.12.1 → 11201): it keeps growing, so an update installs over the current app. MINOR and PATCH must stay below 100; the build fails otherwise. build.yml:205(sedofVTESSE_VERSION) and the Gradle regex[0-9.]+already accept three parts; check them.- Docs:
docs/testing.md:35-44("MAJOR.MM", "two-digit minor"), comments inversion.h:4andbuild.yml:17. CHANGELOG.md: the old headings1.00…1.12stay; the header says that versions after 1.12 useMAJOR.MINOR.PATCH.
Version rule
Versions are MAJOR.MINOR.PATCH, numbers without leading zeros (the common rule of the OpenIPC repositories maintained together with vtesse, vectis, camex, cerberus and decoder):
- PATCH: fixes and small changes. MINOR: a new feature (option, format field, codec/protocol, platform). MAJOR: a large update or an incompatible change (arguments, config format, protocol, default behaviour), only when the maintainer decides.
- Every pull request that changes code or the build bumps the version as its last commit before the merge, together with its
CHANGELOG.mdsection. Pull requests with only docs, CI, tests or images do not. - The version lives in one place,
include/vtesse/version.h; the build, CI and the release read it from there, not from git tags.
CI check
A pull-request job that fails when code changed but the version did not (checkout with fetch-depth: 0):
ver() { sed -n 's/^#define VTESSE_VERSION "\(.*\)"/\1/p'; }
base=origin/main
changed=$(git diff --name-only "$base"...HEAD -- include netcore cli android server port scripts third_party Makefile ci)
old=$(git show "$base:include/vtesse/version.h" | ver)
new=$(ver < include/vtesse/version.h)
echo "$new" | grep -Eq '^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$' || { echo "::error::version $new is not MAJOR.MINOR.PATCH"; exit 1; }
if [ -n "$changed" ] && [ "$old" = "$new" ]; then
echo "::error::code changed, version still $old; bump it (PATCH or MINOR) and add a CHANGELOG.md section:"
echo "$changed"; exit 1
fiAlso check that the new version is greater than the old one (sort -V). Describe the rule where the project documents its releases (all three README files in one commit, or docs/).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
uniRelease naming and management, common across the repositoriesRelease naming and management, common across the repositories
Activity
ci: a manual run of main publishes; Markdown in code directories need…
Merge pull request #45 from OpenIPC/ci/version-check
compot-dev commentedon Oct 17, 2026
Done: #45 (
.github/check-version.shin a pull-request job,MAJOR.MINOR.PATCHrule indocs/testing.md,mainno longer cancels a running release) and #46 (the AndroidversionCodeformulaMAJOR*10000 + MINOR*100 + PATCH, 11300 for 1.13.0). Thelatestrelease is nowVTesse 1.13.0.