repo.or.cz
/
git-cola.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
release: use tag-based versioning
[git-cola.git]
/
scripts
/
gitversion.sh
blob
6e617007f136415f34ad239f7ebefa07b5d3d1e6
1
#!/bin/sh
2
VN
=
$
(
git describe HEAD
2
>/
dev
/
null
)
3
VN
=
$
(
echo
"
$VN
"
|
sed
-e
's/-/./g'
)
4
LF
=
'
5
'
6
case
"
$VN
"
in
7
*
$LF
*) (
exit
1
) ;;
8
v
[
0
-9
]*)
9
test -z
"$(git diff-index --name-only HEAD)"
||
10
VN
=
"
$VN
-dirty"
;;
11
esac
12
VN
=
$
(
expr
"
$VN
"
:
v
*
'\(.*\)'
)
13
echo
"VERSION='
$VN
'"