From 54cc7812350f6f9ea6b70311d3cd79625132370e Mon Sep 17 00:00:00 2001 From: casey langen Date: Sun, 1 Nov 2020 00:12:10 -0700 Subject: [PATCH] Added a script that only bumps the commit hash in version.h --- script/update-version-hash.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 script/update-version-hash.sh 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