mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-28 00:20:47 +01:00
0b14f9a446
- version.h is now static (should increase on new releases) - if compiler flag is passed, will try to use version_auto.h (autogen) (auto only on compiler flag to avoid include'ing a non-existant file) - avoid clobbered version.h as may force recompiles
19 lines
340 B
Bash
19 lines
340 B
Bash
#!/bin/sh
|
|
|
|
# echo current git version (doesn't make version_auto.h)
|
|
|
|
# test if git exists
|
|
if ! command -v git > /dev/null
|
|
then
|
|
VERSION="unknown"
|
|
else
|
|
VERSION=$(git describe --always 2>&1 | tr : _ )
|
|
fi
|
|
|
|
# ignore git stderr "fatal:
|
|
if case $VERSION in fatal*) ;; *) false;; esac; then
|
|
echo "unknown"
|
|
else
|
|
echo "$VERSION"
|
|
fi;
|