actual version bump support

This commit is contained in:
Agel committed 2026-11-19 12:25:43 +01:00
1 parent 6445c23fae
commit 4b3a959654
5 files changed
+351 -109

No files matched your search

+10 -6
View File
@@ -155,14 +155,17 @@ scripts/start-runner-macos.sh
```
### Semantic Versioning & CI Release Pipeline
- **Base Version (`VERSION`)**: Tracked in the repository root as `MAJOR.MINOR.PATCH` (initially `0.1.0`). Bump manually when advancing `MAJOR` or `MINOR`.
- **Current Version (`VERSION`)**: Tracked in the repository root as `MAJOR.MINOR.PATCH` (automatically updated on `master` after each successful pipeline; bump manually when advancing `MAJOR` or `MINOR`).
- **Version Resolution (`scripts/compute-version.sh`)**:
- **On `master`**: Reuses an existing `vX.Y.Z` tag if `HEAD` is already tagged; otherwise sets `PATCH = max(BASE_PATCH, max_tag_patch + 1)` and outputs `MAJOR.MINOR.PATCH`.
- **On feature branches**: Computes `PATCH = max(BASE_PATCH, max_tag_patch + 1)` and outputs a SemVer 2.0.0 pre-release string `MAJOR.MINOR.PATCH-<sanitized-branch>.<short-sha>` (e.g., `0.1.2-fix-epub.62c08ac`).
- **On `master`**: Reads and outputs `MAJOR.MINOR.PATCH` directly from `VERSION`.
- **On feature branches**: Outputs a SemVer 2.0.0 pre-release string `MAJOR.MINOR.PATCH-<sanitized-branch>.<short-sha>` (e.g., `0.1.2-fix-epub.62c08ac`).
- **Build & Metadata Propagation**: `CMakeLists.txt` resolves `ASTERIA_VERSION` (or accepts `-DASTERIA_VERSION=...`), populates `PROJECT_VERSION`, `ASTERIA_VERSION_STRING`, `QApplication::applicationVersion()`, `AppInfo.version`, macOS bundle `Info.plist` (`CFBundleShortVersionString` / `CFBundleVersion`), and Windows `VS_VERSION_INFO` via `src/asteria.rc.in`.
- **CI Isolation & Auto-Tagging (`.gitlab-ci.yml`)**:
- `update-wiki` and `bump-version` run strictly on `master` (non-MR pipelines). Feature branches never update the wiki or create tags.
- At the end of a successful `master` pipeline (`release` stage, after packaging and `update-wiki`), `bump-version` creates tag `vX.Y.Z` via the GitLab Tags API (using `GITLAB_TOKEN`). Tag pipelines (`$CI_COMMIT_TAG`) are skipped in `workflow: rules:` to prevent loops.
- **CI Isolation, Auto-Bump & Token Rotation (`.gitlab-ci.yml`, `scripts/bump-version.sh`)**:
- `update-wiki` and `bump-version` run strictly on `master` (non-MR pipelines). Feature branches never update the wiki, create tags, or bump `VERSION`.
- At the end of a successful `master` pipeline (`release` stage, after packaging and `update-wiki`), `bump-version` runs `scripts/bump-version.sh`:
1. Checks `GITLAB_TOKEN` expiration via GitLab API and, if within `TOKEN_ROTATE_THRESHOLD_DAYS` (default `30`) and the `GITLAB_TOKEN` CI/CD variable is API-writable, self-rotates the token and updates the CI/CD variable automatically.
2. Creates release tag `vX.Y.Z` at `CI_COMMIT_SHA` via the GitLab Tags API (if absent).
3. Increments `PATCH` in `VERSION` (`X.Y.(Z+1)`), commits `chore: bump version to ... [skip ci]`, and pushes to `master` with `-o ci.skip`. Tag pipelines (`$CI_COMMIT_TAG`) are skipped in `workflow: rules:` to prevent loops.
### VS Code & CMake Presets
Pre-configured tasks, launch configurations, and CMake presets are available:
@@ -308,6 +311,7 @@ Asteria supports **Dark**, **Light**, and user-editable **Custom** themes:
```
VERSION
scripts/
bump-version.sh
compute-version.sh
src/
asteria.rc.in