models: add export_patchset helper
[ugit.git] / scripts / version.sh
blob1dc21518be3e86b50c94b7132303f91bb65b2c0f
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+\.\d+)(\.[^.]+)$/\1/')
6 echo $VERSION