Files
renderdoc/scripts/hash_version.sh
T
baldurk ae50fa99ee Revamp version tagging, remove ugly suffix on git hash. Refs #571
* Tacking -official onto the git hash was a hack only needed on windows,
  and since we want more information it doesn't scale.
* Instead we track anything we need to know about the version in
  separate variables, like whether it's a stable build or a nightly/
  local build. Or if it's built by a downstream distribution then the
  version number for the downstream build.
2017-04-27 19:47:50 +01:00

15 lines
559 B
Bash

#!/bin/bash
if [ ! -f renderdoc/data/resource.h ]; then
echo "This script should be run from the root of the checkout.";
echo "e.g. ./scripts/hash_version.sh";
exit;
fi
GIT_HASH=`git status > /dev/null 2>&1 && git rev-parse HEAD || echo NO_GIT_COMMIT_HASH_DEFINED`;
rm -f ver
sed "s/NO_GIT_COMMIT_HASH_DEFINED/$GIT_HASH/" renderdoc/api/replay/version.h > ver && mv ver renderdoc/api/replay/version.h
sed -b "s/NO_GIT_COMMIT_HASH_DEFINED/$GIT_HASH/" renderdocui/Properties/AssemblyInfo.cs > ver && mv ver renderdocui/Properties/AssemblyInfo.cs
rm -f ver