mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
ae50fa99ee
* 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.
15 lines
559 B
Bash
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
|