diff --git a/script/update-version-hash.sh b/script/update-version-hash.sh new file mode 100644 index 000000000..53f600906 --- /dev/null +++ b/script/update-version-hash.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +COMMIT_HASH=`git rev-parse --short HEAD 2> /dev/null | sed "s/\(.*\)/#\1/"` +sed -Ei.bak "s/(\s*)(#define VERSION_COMMIT_HASH )(.*)/\1\2\"${COMMIT_HASH}\"/g" src/musikcore/version.h +rm src/musikcore/version.h.bak