Move plugin version into .env, fix version-bump workflow to only touch it
Version Bump / check-bump-label (pull_request) Skipped
Version Bump / apply-version-bump (pull_request) Successful in 23s

The old workflow grepped CMakeLists.txt for the first "VERSION X.Y" match,
which was cmake_minimum_required's own version rather than the project's,
mangling it to 3.27.0.0 on the first real bump. PLUGIN_VERSION in .env is
now the single source of truth for both CMakeLists.txt and flake.nix, and
the workflow's bump/commit steps only ever touch that one file.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-30 00:02:19 +02:00
co-authored by Claude Sonnet 5
parent d5338c3d6a
commit 9acfd2b946
4 changed files with 31 additions and 12 deletions
+12 -1
View File
@@ -1,8 +1,19 @@
cmake_minimum_required(VERSION 3.27)
# PLUGIN_VERSION lives in .env (single source of truth - also read by
# flake.nix) so .gitea/workflows/version-bump.yml only ever has to touch one
# file, rather than a "VERSION X.Y" grep/sed that can't tell this project's
# own version apart from cmake_minimum_required's version above.
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/.env" HYPR_CHROME_ENV_LINES)
foreach(HYPR_CHROME_ENV_LINE IN LISTS HYPR_CHROME_ENV_LINES)
if(HYPR_CHROME_ENV_LINE MATCHES "^PLUGIN_VERSION=(.*)$")
set(HYPR_CHROME_PLUGIN_VERSION "${CMAKE_MATCH_1}")
endif()
endforeach()
project(hypr-chrome
DESCRIPTION "Draws a chamfered HUD-style border frame with a title bar around each window."
VERSION 0.1
VERSION ${HYPR_CHROME_PLUGIN_VERSION}
)
# Match the Makefile's prior default (CXXFLAGS ?= -O2) so a bare `cmake -B