Fix getting of git describe strings for #768

This commit is contained in:
Tom Morris 2013-08-15 15:34:19 -04:00
parent d5873c5803
commit 4ab69a0ecb

4
refine
View File

@ -208,12 +208,13 @@ get_version() {
get_revision() { get_revision() {
if [ -d ".svn" ] ; then if [ -d ".svn" ] ; then
INFO=`svn info` INFO=`svn info`
REVISION=`echo $INFO | sed s/^$VERSION-//`
elif [ -d ".git" ] ; then elif [ -d ".git" ] ; then
INFO=`git describe` INFO=`git describe`
REVISION=${`echo $INFO`:3}
else else
error "cannot obtain revision, exiting!" error "cannot obtain revision, exiting!"
fi fi
REVISION=`echo $INFO | sed s/^$VERSION-//`
} }
download() { download() {
@ -491,6 +492,7 @@ dist() {
echo " {" echo " {"
echo " \"description\": \"OpenRefine ${VERSION}\"," echo " \"description\": \"OpenRefine ${VERSION}\","
echo " \"version\": \"${VERSION}\"," echo " \"version\": \"${VERSION}\","
# TODO: We need to modify version checking for the future
echo " \"revision\": \"${REVISION}\"" echo " \"revision\": \"${REVISION}\""
echo " }," echo " },"
echo echo