summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authornnra <104775644+nnra6864@users.noreply.github.com>2025-10-23 21:50:32 +0200
committerGitHub <noreply@github.com>2025-10-23 20:50:32 +0100
commit019589e23ff95ad8d14a083a614a3ccf17083007 (patch)
tree7f4f6d030d48139b10c31d3eb6eb60c79de19ab6 /scripts
parent057695bc3f7de5e8841c15252fc51029590895e4 (diff)
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
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/generateVersion.sh27
1 files changed, 0 insertions, 27 deletions
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