mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-29 15:22:26 +00:00
8587c34719
include git.h only from a single file
8 lines
280 B
Bash
Executable file
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
|