1
0
mirror of https://github.com/clangen/musikcube.git synced 2025-01-18 10:14:19 +00:00
musikcube/script/update-version-hash.sh

6 lines
223 B
Bash
Raw Normal View History

#!/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