/
version.sh
executable file
·19 lines (14 loc) · 394 Bytes
1
#!/bin/sh
2
3
v="v3.99"
4
5
if [ -d .git ] && tag=`git describe --tags`; then
6
v="$tag"
7
8
9
10
11
# Update the index from working tree first
git update-index --refresh --unmerged > /dev/null
# Does the index show uncommitted changes?
12
git diff-index --exit-code HEAD > /dev/null || \
13
v="$v"-dirty
14
else
15
v="$v"-unknown
16
17
fi
18
echo "const char *openconnect_version_str = \"$v\";" > $1
19
echo "New version: $v"