From 019589e23ff95ad8d14a083a614a3ccf17083007 Mon Sep 17 00:00:00 2001 From: nnra <104775644+nnra6864@users.noreply.github.com> Date: Thu, 23 Oct 2025 21:50:32 +0200 Subject: build: replace generateVersion.sh (#12110) * Implemented the CMake version of generateVersion.sh * Made version.h.in compatible with the new build system and included version.h in helpers/MiscFunctions.cpp * Deleted the scripts/generateVersion.sh as it's no longer needed * Updated meson.build to match the new workflow * Added an empty line between includes and namespaces that I accidentally removed --- scripts/generateVersion.sh | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100755 scripts/generateVersion.sh (limited to 'scripts') diff --git a/scripts/generateVersion.sh b/scripts/generateVersion.sh deleted file mode 100755 index 9313815d..00000000 --- a/scripts/generateVersion.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -# if the git directory doesn't exist, don't gather data to avoid overwriting, unless -# the version file is missing altogether (otherwise compiling will fail) -if [ ! -d ./.git ]; then - if [ -f ./src/version.h ]; then - exit 0 - fi -fi - -cp -fr ./src/version.h.in ./src/version.h - -HASH=${HASH-$(git rev-parse HEAD)} -BRANCH=${BRANCH-$(git branch --show-current)} -MESSAGE=${MESSAGE-$(git show | head -n 5 | tail -n 1 | sed -e 's/#//g' -e 's/\"//g')} -DATE=${DATE-$(git show --no-patch --format=%cd --date=local)} -DIRTY=${DIRTY-$(git diff-index --quiet HEAD -- || echo dirty)} -TAG=${TAG-$(git describe --tags)} -COMMITS=${COMMITS-$(git rev-list --count HEAD)} - -sed -i -e "s#@HASH@#${HASH}#" ./src/version.h -sed -i -e "s#@BRANCH@#${BRANCH}#" ./src/version.h -sed -i -e "s#@MESSAGE@#${MESSAGE}#" ./src/version.h -sed -i -e "s#@DATE@#${DATE}#" ./src/version.h -sed -i -e "s#@DIRTY@#${DIRTY}#" ./src/version.h -sed -i -e "s#@TAG@#${TAG}#" ./src/version.h -sed -i -e "s#@COMMITS@#${COMMITS}#" ./src/version.h -- cgit v1.2.3