blob: 2a41ed4d69e28f23484e0ff8b49c5c5edff703c1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/sh
# Gets the version number from git, or from the contents of .version
VERSION=
if test -f ".version"
then
VERSION=$(cat .version)
fi
if test -d "./.git"
then
VERSION=$(git describe --tags)
VERSION=${VERSION#v}
echo $VERSION > .version
fi
if test "x$VERSION" = "x"
then
VERSION="unknown"
fi
echo "$VERSION"
|