AfRApay/AfRApay.MateCard/scripts/build_git_rev.sh

7 lines
237 B
Bash
Executable file

#!/bin/bash
branch=$(git rev-parse --abbrev-ref HEAD)
rev=$(git diff --quiet && git describe --long --always --dirty --exclude=* --abbrev=8 || echo "dirty")
echo "-DAFRAPAY_GIT_BRANCH=\\\"$branch\\\" -DAFRAPAY_GIT_COMMIT=\\\"$rev\\\""