model: improve the core model to allow recursive object structures
[git-cola.git] / scripts / version.sh
blob8376e6a3207af5be2550e757efb0a2c559303f61
1 #!/bin/sh
2 VERSION=$(git describe HEAD 2>/dev/null)
3 VERSION=$(echo "$VERSION" | sed -e 's/^v//')
4 VERSION=$(echo "$VERSION" | sed -e 's/-/./g')
5 VERSION=$(echo "$VERSION" | perl -p -e 's/(\d+\.\d+)\.[^.]+$/\1/')
6 echo $VERSION