cnq3/makefiles/create_git_header.sh
myT 8587c34719 updated the changelog and version
include git.h only from a single file
2023-11-12 01:33:01 +01:00

8 lines
280 B
Bash
Executable file

#!/bin/sh
COMMIT="$(git rev-parse HEAD)"
COMMIT_SHORT="$(git rev-parse --short HEAD)"
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
echo "#define GIT_COMMIT \"${COMMIT}\"" > $1
echo "#define GIT_COMMIT_SHORT \"${COMMIT_SHORT}\"" >> $1
echo "#define GIT_BRANCH \"${BRANCH}\"" >> $1