improved version details bash script to include a svn revision number (of type int)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5509 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-09-04 19:04:48 +00:00
parent 2a460051e5
commit 61429b0ddd
2 changed files with 6 additions and 2 deletions

View File

@ -8,10 +8,11 @@
#include <string>
#define LIB_VERSION "0.5.3c"
#define SVN_REVISION "Revision "
#define SVN_REVISION "Revision: 5501 date : 21:01:27 09.04.12"
#define SVN_REVISION_NUMBER 0
namespace RsUtil {
std::string retroshareVersion();
}
}

View File

@ -20,10 +20,13 @@ fi
if ( svn info &> /dev/null); then
version=$(svn info | grep '^Revision:')
fi
if [[ $version != '' ]]; then
version_number=`echo $version | cut -d: -f2`
version="$version date : $(date +'%T %m.%d.%y')"
echo "Writing version to util/rsversion.h : $version "
sed -i "s/SVN_REVISION .*/SVN_REVISION \"$version\"/g" util/rsversion.h
sed -i "s/SVN_REVISION_NUMBER .*/SVN_REVISION_NUMBER $version_number/g" util/rsversion.h
fi
echo "script version_detail.sh finished normally"
exit 0