From 61429b0ddd9a0181d9f0689566e6a91ea1b10a5f Mon Sep 17 00:00:00 2001 From: csoler Date: Tue, 4 Sep 2012 19:04:48 +0000 Subject: [PATCH] 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 --- libretroshare/src/util/rsversion.h | 5 +++-- libretroshare/src/version_detail.sh | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/util/rsversion.h b/libretroshare/src/util/rsversion.h index e948bfb2c..3e39195af 100644 --- a/libretroshare/src/util/rsversion.h +++ b/libretroshare/src/util/rsversion.h @@ -8,10 +8,11 @@ #include #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(); -} \ No newline at end of file +} diff --git a/libretroshare/src/version_detail.sh b/libretroshare/src/version_detail.sh index 26a6a29b6..98c9be8a7 100755 --- a/libretroshare/src/version_detail.sh +++ b/libretroshare/src/version_detail.sh @@ -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