From 4d64bbe8bd5f736b07f878a773fa85a192c6f603 Mon Sep 17 00:00:00 2001 From: Jean Philippe Date: Thu, 2 Jul 2026 18:03:29 +0900 Subject: [PATCH] feat: added support of tag and versioning system --- .commitlintrc.json | 17 +++ .github/workflows/Engine-CI.yml | 15 ++- .github/workflows/job-clangformat.yml | 2 +- .github/workflows/job-commitlint.yml | 19 +++ .../workflows/release-please-prerelease.yml | 54 ++++++++ .github/workflows/release-please.yml | 53 ++++++++ .release-please-manifest-prerelease.json | 3 + .release-please-manifest.json | 3 + CHANGELOG.md | 9 ++ CMakeLists.txt | 19 ++- Contributing.md | 116 +++++++++++++++++- Scripts/BuildEngine.ps1 | 4 +- Scripts/ClangFormat.ps1 | 2 +- Scripts/hooks/pre-push | 37 ++++++ Scripts/install-hooks.sh | 23 ++++ VERSION.txt | 1 + ZEngine/CMakeLists.txt | 7 +- ZEngine/ZEngine/CMakeLists.txt | 34 +++++ ZEngine/ZEngine/Core/version.h.in | 8 ++ release-please-config-prerelease.json | 21 ++++ release-please-config.json | 19 +++ 21 files changed, 452 insertions(+), 14 deletions(-) create mode 100644 .commitlintrc.json create mode 100644 .github/workflows/job-commitlint.yml create mode 100644 .github/workflows/release-please-prerelease.yml create mode 100644 .github/workflows/release-please.yml create mode 100644 .release-please-manifest-prerelease.json create mode 100644 .release-please-manifest.json create mode 100644 CHANGELOG.md create mode 100755 Scripts/hooks/pre-push create mode 100755 Scripts/install-hooks.sh create mode 100644 VERSION.txt create mode 100644 ZEngine/ZEngine/Core/version.h.in create mode 100644 release-please-config-prerelease.json create mode 100644 release-please-config.json diff --git a/.commitlintrc.json b/.commitlintrc.json new file mode 100644 index 00000000..b4478499 --- /dev/null +++ b/.commitlintrc.json @@ -0,0 +1,17 @@ +{ + "rules": { + "type-enum": [ + 2, + "always", + ["feat", "fix", "docs", "style", "refactor", "perf", "test", "build", "ci", "chore", "revert"] + ], + "type-case": [2, "always", "lower-case"], + "type-empty": [2, "never"], + "scope-case": [2, "always", "lower-case"], + "subject-empty": [2, "never"], + "subject-full-stop": [2, "never", "."], + "header-max-length": [2, "always", 100], + "body-leading-blank": [1, "always"], + "footer-leading-blank": [1, "always"] + } +} diff --git a/.github/workflows/Engine-CI.yml b/.github/workflows/Engine-CI.yml index 1c44a190..954173bd 100644 --- a/.github/workflows/Engine-CI.yml +++ b/.github/workflows/Engine-CI.yml @@ -5,28 +5,35 @@ on: branches: [ master, develop, arena-integration ] jobs: + commitlint: + if: github.event_name == 'pull_request' + uses: ./.github/workflows/job-commitlint.yml + clang-format: strategy: matrix: - directories: [ZEngine, Tetragrama] + directories: [ZEngine, Tetragrama, Obelisk] uses: ./.github/workflows/job-clangformat.yml with: srcDirectory: ${{ matrix.directories }} windows: - needs: clang-format + needs: [commitlint, clang-format] + if: ${{ !failure() && !cancelled() }} uses: ./.github/workflows/windows-build.yml with: targetFramework: net8.0 macOS: - needs: clang-format + needs: [commitlint, clang-format] + if: ${{ !failure() && !cancelled() }} uses: ./.github/workflows/macOS-build.yml with: targetFramework: net8.0 linux: - needs: clang-format + needs: [commitlint, clang-format] + if: ${{ !failure() && !cancelled() }} uses: ./.github/workflows/linux-build.yml with: targetFramework: net8.0 diff --git a/.github/workflows/job-clangformat.yml b/.github/workflows/job-clangformat.yml index 7d09ff31..659125fa 100644 --- a/.github/workflows/job-clangformat.yml +++ b/.github/workflows/job-clangformat.yml @@ -18,5 +18,5 @@ jobs: run: choco upgrade llvm - name: Checking formatting - run: .\Scripts\ClangFormat.ps1 -SourceDirectory ${{ github.workspace }}/${{ inputs.srcDirectory }} -RunAsCheck 1 + run: .\Scripts\ClangFormat.ps1 -SourceDirectory ${{ github.workspace }}/${{ inputs.srcDirectory }} -RunAsCheck shell: pwsh diff --git a/.github/workflows/job-commitlint.yml b/.github/workflows/job-commitlint.yml new file mode 100644 index 00000000..8cadc688 --- /dev/null +++ b/.github/workflows/job-commitlint.yml @@ -0,0 +1,19 @@ +name: Commit Lint + +on: + workflow_call: + +jobs: + commitlint: + name: commitlint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Lint commit messages + uses: wagoid/commitlint-github-action@v6 + with: + configFile: .commitlintrc.json + failOnWarnings: false diff --git a/.github/workflows/release-please-prerelease.yml b/.github/workflows/release-please-prerelease.yml new file mode 100644 index 00000000..f49ca5bd --- /dev/null +++ b/.github/workflows/release-please-prerelease.yml @@ -0,0 +1,54 @@ +name: Release Please (Pre-release) + +on: + push: + branches: [develop] + +permissions: + contents: write + pull-requests: write + +jobs: + release-please: + runs-on: ubuntu-latest + outputs: + release_created: ${{ steps.release.outputs.release_created }} + tag_name: ${{ steps.release.outputs.tag_name }} + steps: + - uses: googleapis/release-please-action@v4 + id: release + with: + config-file: release-please-config-prerelease.json + manifest-file: .release-please-manifest-prerelease.json + token: ${{ secrets.GITHUB_TOKEN }} + + publish: + needs: release-please + if: ${{ needs.release-please.outputs.release_created }} + strategy: + matrix: + include: + - os: windows-2022 + artifact: windows + targetFramework: net8.0 + - os: macos-latest + artifact: macOS + - os: ubuntu-latest + artifact: linux + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - name: Build (${{ matrix.artifact }}) + uses: ./.github/workflows/job-cmakebuild-${{ matrix.artifact }}.yml + with: + targetFramework: ${{ matrix.targetFramework }} + + - name: Upload pre-release artifacts + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ needs.release-please.outputs.tag_name }} + prerelease: true + files: | + build/**/*.zip + build/**/*.tar.gz diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 00000000..f8b37d5d --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,53 @@ +name: Release Please (Stable) + +on: + push: + branches: [main] + +permissions: + contents: write + pull-requests: write + +jobs: + release-please: + runs-on: ubuntu-latest + outputs: + release_created: ${{ steps.release.outputs.release_created }} + tag_name: ${{ steps.release.outputs.tag_name }} + steps: + - uses: googleapis/release-please-action@v4 + id: release + with: + config-file: release-please-config.json + manifest-file: .release-please-manifest.json + token: ${{ secrets.GITHUB_TOKEN }} + + publish: + needs: release-please + if: ${{ needs.release-please.outputs.release_created }} + strategy: + matrix: + include: + - os: windows-2022 + artifact: windows + targetFramework: net8.0 + - os: macos-latest + artifact: macOS + - os: ubuntu-latest + artifact: linux + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - name: Build (${{ matrix.artifact }}) + uses: ./.github/workflows/job-cmakebuild-${{ matrix.artifact }}.yml + with: + targetFramework: ${{ matrix.targetFramework }} + + - name: Upload release artifacts + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ needs.release-please.outputs.tag_name }} + files: | + build/**/*.zip + build/**/*.tar.gz diff --git a/.release-please-manifest-prerelease.json b/.release-please-manifest-prerelease.json new file mode 100644 index 00000000..dc88e85d --- /dev/null +++ b/.release-please-manifest-prerelease.json @@ -0,0 +1,3 @@ +{ + ".": "0.3.0-alpha.0" +} diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 00000000..8d7a673f --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.3.0" +} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..9bf07711 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# Changelog + +All notable changes to ZEngine will be documented in this file. + +The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +Versions are managed automatically via [Release Please](https://github.com/googleapis/release-please) +based on [Conventional Commits](https://www.conventionalcommits.org/). + +## [Unreleased] diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a28b597..0ebbf724 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,13 +1,30 @@ cmake_minimum_required (VERSION 3.17 FATAL_ERROR) +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt" ZENGINE_VERSION) +string(STRIP "${ZENGINE_VERSION}" ZENGINE_VERSION) + project (RendererEngine - VERSION 1.0 + VERSION ${ZENGINE_VERSION} DESCRIPTION "Renderer Engine is an open-source 2D - 3D rendering engine written in C/C++" LANGUAGES CXX C ) set_property (GLOBAL PROPERTY USE_FOLDERS ON) +# Install git hooks automatically at configure time so contributors don't need +# to run install-hooks.sh manually. +# +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") + file(GLOB _hook_files "${CMAKE_CURRENT_SOURCE_DIR}/Scripts/hooks/*") + foreach(_hook ${_hook_files}) + get_filename_component(_hook_name "${_hook}" NAME) + set(_dst "${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks/${_hook_name}") + file(COPY "${_hook}" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks") + file(CHMOD "${_dst}" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + message(STATUS "Installed git hook: ${_hook_name}") + endforeach() +endif() + # Core invariants # diff --git a/Contributing.md b/Contributing.md index 2e391530..7d4141b4 100644 --- a/Contributing.md +++ b/Contributing.md @@ -1,7 +1,7 @@ # Contributing to ZEngine -When contributing to this repository, please first discuss the change you wish to make via issue. +When contributing to this repository, please first discuss the change you wish to make via issue. ## Rules @@ -14,13 +14,121 @@ When contributing to this repository, please first discuss the change you wish t ZEngine is a 3D rendering engine. So every piece of code has to be scrutinized to look for potential bottlenecks or slow downs. Ultimately the goal is to render more with less resources. +## Commit Message Convention + +ZEngine uses [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). Every commit message is linted on pull requests and drives automatic versioning — the type you choose determines how the version number is bumped. + +### Format + +``` +(): + +[optional body] + +[optional footer(s)] +``` + +- **type** — required, lowercase (see table below) +- **scope** — optional, lowercase, names the subsystem affected (e.g. `rendering`, `vulkan`, `camera`, `memory`, `ci`) +- **subject** — required, imperative mood, no trailing period, max 100 characters total for the header +- **body** — free prose; wrap at 72 characters; separate from subject with a blank line +- **footer** — key: value pairs; `BREAKING CHANGE: ` triggers a major version bump + +### Types and version impact + +| Type | When to use | Version bump | +|---|---|---| +| `feat` | A new feature visible to users or engine consumers | minor (`0.3.0` → `0.4.0`) | +| `fix` | A bug fix | patch (`0.3.0` → `0.3.1`) | +| `perf` | A performance improvement with no API change | patch | +| `refactor` | Code restructuring with no behaviour or API change | patch | +| `docs` | Documentation only | none | +| `style` | Formatting, whitespace — no logic change | none | +| `test` | Adding or correcting tests | none | +| `build` | Build system or external dependency changes | none | +| `ci` | CI/CD pipeline changes | none | +| `chore` | Maintenance tasks (e.g. release bumps) | none | +| `revert` | Reverts a previous commit | patch | + +A `!` suffix on any type (e.g. `feat!:`) or a `BREAKING CHANGE:` footer triggers a **major** bump. + +### Examples + +``` +feat(rendering): add indirect draw support for mesh batches +``` + +``` +fix(vulkan): correct semaphore leak on swapchain recreation +``` + +``` +perf(memory): replace per-frame heap alloc with arena in render loop +``` + +``` +feat!: remove legacy OpenGL backend + +BREAKING CHANGE: the OpenGL renderer has been removed. Vulkan is now +the only supported backend. Update your application startup code to +remove any OpenGL-specific initialisation. +``` + +``` +refactor(camera): extract projection logic into CameraUtils + +No behaviour change. Simplifies FlyCamera and OrbitCamera by sharing +the common frustum calculation. +``` + +### What happens if a commit message is wrong + +A CI check (`commitlint`) runs on every pull request and will block the build if any commit in the PR branch does not follow the format. Fix the message with `git rebase -i` before requesting review. + +## Local Setup + +Git hooks are installed automatically the first time you run CMake. No manual steps required. + +The `pre-push` hook runs clang-format on `ZEngine` and `Tetragrama` before every push, mirroring the CI check. It requires [PowerShell Core (`pwsh`)](https://github.com/PowerShell/PowerShell/releases) and LLVM `clang-format` (version 20–22). If `pwsh` is not found the hook prints a warning and lets the push through; CI will catch formatting issues instead. + +## Release Process + +ZEngine has two release tracks, both fully automated from commit messages. + +### Stable releases (`main`) + +Merges into `main` are picked up by Release Please, which opens a **Release PR** accumulating all changes since the last stable tag. When that PR is merged: + +- `VERSION.txt` is bumped (`0.3.0` → `0.3.1` / `0.4.0` / `1.0.0`) based on commit types +- A tag `v0.3.1` is created +- A GitHub Release is published with build artifacts for all platforms + +### Pre-releases (`develop`) + +Pushes to `develop` follow the same process but produce alpha versions: + +- Release Please opens a **Pre-release PR** on `develop` +- When merged: `VERSION.txt` is set to e.g. `0.4.0-alpha.1`, tag `v0.4.0-alpha.1` is created +- A GitHub Pre-release is published (marked as pre-release in the GitHub UI) +- Each subsequent batch of commits increments the alpha counter: `alpha.1` → `alpha.2` → … + +### Promoting a pre-release to stable + +Once `develop` is stable enough to ship: + +1. Open a PR from `develop` → `main` +2. Merge it — Release Please on `main` sees all the accumulated `feat:`/`fix:` commits and opens a stable Release PR +3. Merge the Release PR → `v0.4.0` stable is tagged and published + +The `ZENGINE_VERSION_PRERELEASE` macro in the generated `Core/version.h` will be non-empty on alpha builds and empty on stable, so engine code can detect this at compile time. + ## Pull Request Process -1. Make sure to transmit that your modification +1. Make sure your modification is covered by the rules above and discussed in an issue first. -2. Update the README.md with details of changes to the interface, this includes new environment +2. Update the README.md with details of changes to the interface, including new environment variables, exposed ports, useful file locations and container parameters. -4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you +3. You may merge the Pull Request once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you. diff --git a/Scripts/BuildEngine.ps1 b/Scripts/BuildEngine.ps1 index 2925eb8c..4323d161 100644 --- a/Scripts/BuildEngine.ps1 +++ b/Scripts/BuildEngine.ps1 @@ -189,7 +189,9 @@ if(-Not $LauncherOnly) { ) foreach ($directory in $srcDirectories) { - & pwsh -File $clangFormatScript -SourceDirectory $directory -RunAsCheck:$VerifyFormatting + [string[]]$clangFormatArgs = @('-File', $clangFormatScript, '-SourceDirectory', $directory) + if ($VerifyFormatting) { $clangFormatArgs += '-RunAsCheck' } + & pwsh @clangFormatArgs if ($LASTEXITCODE -ne 0) { Write-Error "Stopped build process..." -ErrorAction Stop diff --git a/Scripts/ClangFormat.ps1 b/Scripts/ClangFormat.ps1 index 970383e9..7bebfbab 100644 --- a/Scripts/ClangFormat.ps1 +++ b/Scripts/ClangFormat.ps1 @@ -27,7 +27,7 @@ param ( [string]$SourceDirectory, [Parameter(HelpMessage = "Whether clang-format should only check if the source code is well-formatted")] - [bool]$RunAsCheck=$False + [switch]$RunAsCheck ) $ErrorActionPreference = "Stop" diff --git a/Scripts/hooks/pre-push b/Scripts/hooks/pre-push new file mode 100755 index 00000000..16b894c0 --- /dev/null +++ b/Scripts/hooks/pre-push @@ -0,0 +1,37 @@ +#!/usr/bin/env sh +# pre-push: runs clang-format check on ZEngine and Tetragrama before a push. +# Mirrors the job-clangformat.yml CI check so formatting issues are caught locally. + +REPO_ROOT="$(git rev-parse --show-toplevel)" + +if ! command -v pwsh > /dev/null 2>&1; then + echo "[pre-push] pwsh (PowerShell Core) not found — skipping clang-format check." + echo "[pre-push] Install it from https://github.com/PowerShell/PowerShell/releases" + exit 0 +fi + +FAILED=0 +for DIR in ZEngine Tetragrama Obelisk Resources/Shaders; do + echo "[pre-push] Checking clang-format: $DIR ..." + pwsh -NonInteractive -NoProfile -File \ + "$REPO_ROOT/Scripts/ClangFormat.ps1" \ + -SourceDirectory "$REPO_ROOT/$DIR" -RunAsCheck + if [ $? -ne 0 ]; then + echo "[pre-push] clang-format violations found in $DIR. Run the formatter and re-stage." + FAILED=1 + fi +done + +if [ $FAILED -ne 0 ]; then + echo "" + echo "[pre-push] Push blocked. Fix formatting by running:" + echo " pwsh Scripts/ClangFormat.ps1 -SourceDirectory ZEngine" + echo " pwsh Scripts/ClangFormat.ps1 -SourceDirectory Tetragrama" + echo " pwsh Scripts/ClangFormat.ps1 -SourceDirectory Obelisk" + echo " pwsh Scripts/ClangFormat.ps1 -SourceDirectory Resources/Shaders" + echo "" + exit 1 +fi + +echo "[pre-push] clang-format OK." +exit 0 diff --git a/Scripts/install-hooks.sh b/Scripts/install-hooks.sh new file mode 100755 index 00000000..86ec3c26 --- /dev/null +++ b/Scripts/install-hooks.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env sh +# Installs project git hooks from Scripts/hooks/ into .git/hooks/. +# Run once after cloning: sh Scripts/install-hooks.sh + +REPO_ROOT="$(git -C "$(dirname "$0")" rev-parse --show-toplevel)" +HOOKS_SRC="$REPO_ROOT/Scripts/hooks" +HOOKS_DST="$REPO_ROOT/.git/hooks" + +for hook in "$HOOKS_SRC"/*; do + name="$(basename "$hook")" + dst="$HOOKS_DST/$name" + + if [ -e "$dst" ] && [ ! -L "$dst" ]; then + echo "Backing up existing hook: $dst -> $dst.bak" + mv "$dst" "$dst.bak" + fi + + ln -sf "$hook" "$dst" + chmod +x "$hook" + echo "Installed: $name" +done + +echo "Git hooks installed successfully." diff --git a/VERSION.txt b/VERSION.txt new file mode 100644 index 00000000..0d91a54c --- /dev/null +++ b/VERSION.txt @@ -0,0 +1 @@ +0.3.0 diff --git a/ZEngine/CMakeLists.txt b/ZEngine/CMakeLists.txt index e7f60b3f..929e9d82 100644 --- a/ZEngine/CMakeLists.txt +++ b/ZEngine/CMakeLists.txt @@ -1,7 +1,10 @@ cmake_minimum_required (VERSION 3.17) -project (ZEngine - VERSION 1.0 +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/../VERSION.txt" ZENGINE_VERSION) +string(STRIP "${ZENGINE_VERSION}" ZENGINE_VERSION) + +project (ZEngine + VERSION ${ZENGINE_VERSION} DESCRIPTION "ZEngine is the core engine lib that provides abstraction on top of OpenGL/DirectX/Metal" LANGUAGES CXX C ) diff --git a/ZEngine/ZEngine/CMakeLists.txt b/ZEngine/ZEngine/CMakeLists.txt index cb73f6fc..de1d4ab6 100644 --- a/ZEngine/ZEngine/CMakeLists.txt +++ b/ZEngine/ZEngine/CMakeLists.txt @@ -1,3 +1,36 @@ +# Parse version components and generate version.h +# +string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)([-+](.*))?$" _ver_match "${ZENGINE_VERSION}") +set(ZENGINE_VERSION_MAJOR ${CMAKE_MATCH_1}) +set(ZENGINE_VERSION_MINOR ${CMAKE_MATCH_2}) +set(ZENGINE_VERSION_PATCH ${CMAKE_MATCH_3}) +set(ZENGINE_VERSION_PRERELEASE ${CMAKE_MATCH_5}) + +execute_process( + COMMAND git rev-parse --short HEAD + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE ZENGINE_GIT_HASH + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET +) +if(NOT ZENGINE_GIT_HASH) + set(ZENGINE_GIT_HASH "unknown") +endif() + +if(ZENGINE_VERSION_PRERELEASE) + set(ZENGINE_VERSION_FULL "${ZENGINE_VERSION_MAJOR}.${ZENGINE_VERSION_MINOR}.${ZENGINE_VERSION_PATCH}-${ZENGINE_VERSION_PRERELEASE}") +else() + set(ZENGINE_VERSION_FULL "${ZENGINE_VERSION_MAJOR}.${ZENGINE_VERSION_MINOR}.${ZENGINE_VERSION_PATCH}") +endif() + +message("-- Engine version: v${ZENGINE_VERSION_FULL}") + +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/Core/version.h.in + ${CMAKE_CURRENT_BINARY_DIR}/Core/version.h + @ONLY +) + file (GLOB_RECURSE HEADER_FILES_LIST CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/*.h) file (GLOB_RECURSE CPP_FILES_LIST CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) file (GLOB_RECURSE RESOURCE_FILES_LIST CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/../Resources/Shaders/*.*) @@ -15,6 +48,7 @@ target_include_directories (zEngineLib PUBLIC ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} ./Applications ./Core ./Core/Maths diff --git a/ZEngine/ZEngine/Core/version.h.in b/ZEngine/ZEngine/Core/version.h.in new file mode 100644 index 00000000..3954a693 --- /dev/null +++ b/ZEngine/ZEngine/Core/version.h.in @@ -0,0 +1,8 @@ +#pragma once + +#define ZENGINE_VERSION_MAJOR @ZENGINE_VERSION_MAJOR @ +#define ZENGINE_VERSION_MINOR @ZENGINE_VERSION_MINOR @ +#define ZENGINE_VERSION_PATCH @ZENGINE_VERSION_PATCH @ +#define ZENGINE_VERSION_PRERELEASE "@ZENGINE_VERSION_PRERELEASE@" +#define ZENGINE_VERSION_STRING "@ZENGINE_VERSION_FULL@" +#define ZENGINE_VERSION_COMMIT "@ZENGINE_GIT_HASH@" diff --git a/release-please-config-prerelease.json b/release-please-config-prerelease.json new file mode 100644 index 00000000..535a166a --- /dev/null +++ b/release-please-config-prerelease.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "release-type": "simple", + "prerelease": true, + "prerelease-type": "alpha", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "changelog-sections": [ + {"type": "feat", "section": "Features"}, + {"type": "fix", "section": "Bug Fixes"}, + {"type": "perf", "section": "Performance"}, + {"type": "refactor", "section": "Refactors"}, + {"type": "docs", "section": "Documentation"}, + {"type": "build", "section": "Build System"}, + {"type": "ci", "section": "CI/CD"}, + {"type": "revert", "section": "Reverts"} + ], + "extra-files": [ + "VERSION.txt" + ] +} diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 00000000..35998a51 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "release-type": "simple", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "changelog-sections": [ + {"type": "feat", "section": "Features"}, + {"type": "fix", "section": "Bug Fixes"}, + {"type": "perf", "section": "Performance"}, + {"type": "refactor", "section": "Refactors"}, + {"type": "docs", "section": "Documentation"}, + {"type": "build", "section": "Build System"}, + {"type": "ci", "section": "CI/CD"}, + {"type": "revert", "section": "Reverts"} + ], + "extra-files": [ + "VERSION.txt" + ] +}