Files
paparazzi/paparazzi_version
T
Felix Ruess 353bd38c5b updated and renamed version script: ./paparazzi_version
will now also print a default version set in this script if using a tarball (no git repo)
2012-07-12 17:29:32 +02:00

15 lines
282 B
Bash
Executable File

#!/bin/sh
DEF_VER=v4.1_unstable
# First try git describe (if running on a git repo),
# then use default version from above (for release tarballs).
if test -d .git -o -f .git
then
VN=$(git describe --match "v[0-9].[0-9]*" --dirty --always --long)
else
VN="$DEF_VER"
fi
echo $VN