Skip to content

Version: MAJOR.MINOR.PATCH, bump rule and CI check #44

Closed

Description

@compot-dev

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.1 for a fix, 1.13.0 for a feature) in the pull request that next changes code. Ordering stays: 1.12 < 1.12.1 < 1.13.0. The release title becomes VTesse 1.12.1.
  • Android versionCode (android/app/build.gradle.kts:9-10): today MAJOR*100+MM (112). New formula MAJOR*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 (sed of VTESSE_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 in version.h:4 and build.yml:17.
  • CHANGELOG.md: the old headings 1.00 … 1.12 stay; the header says that versions after 1.12 use MAJOR.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.md section. 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
fi

Also 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/).

Related: #42, #43.

Activity

  1. added
    uniRelease naming and management, common across the repositories
    on Oct 17, 2026
  2. compot-dev commented on Oct 17, 2026

    @compot-dev
    CollaboratorAuthor

    Done: #45 (.github/check-version.sh in a pull-request job, MAJOR.MINOR.PATCH rule in docs/testing.md, main no longer cancels a running release) and #46 (the Android versionCode formula MAJOR*10000 + MINOR*100 + PATCH, 11300 for 1.13.0). The latest release is now VTesse 1.13.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    uniRelease naming and management, common across the repositories

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions