diff --git a/libretroshare/src/util/rsversioninfo.cc b/libretroshare/src/util/rsversioninfo.cc index 96520af62..04f03322f 100644 --- a/libretroshare/src/util/rsversioninfo.cc +++ b/libretroshare/src/util/rsversioninfo.cc @@ -12,7 +12,7 @@ std::string RsUtil::retroshareVersion() { std::string version; - rs_sprintf(version, "%d.%d.%d%s Revision %d", RS_MAJOR_VERSION, RS_MINOR_VERSION, RS_BUILD_NUMBER, RS_BUILD_NUMBER_ADD, RS_REVISION_NUMBER); + rs_sprintf(version, "%d.%d.%d%s Revision %08x", RS_MAJOR_VERSION, RS_MINOR_VERSION, RS_BUILD_NUMBER, RS_BUILD_NUMBER_ADD, RS_REVISION_NUMBER); return version; } diff --git a/libretroshare/src/version_detail.sh b/libretroshare/src/version_detail.sh index b9fbead07..d13a30978 100755 --- a/libretroshare/src/version_detail.sh +++ b/libretroshare/src/version_detail.sh @@ -5,24 +5,24 @@ set +e if ( git log -n 1 &> /dev/null); then #retrieve git information - version="git : $(git status | grep branch | cut -c 13-) $(git log -n 1 | grep commit | cut -c 8-)" + version="$(git log --pretty=format:"%H" | head -1 | cut -c1-8)" fi -if ( git log -n 1 | grep svn &> /dev/null); then - #retrieve git svn information - version="${version} svn : $(git log -n 1 | awk '/svn/ {print $2}' | head -1 | sed 's/.*@//')" -elif ( git log -n 10 | grep svn &> /dev/null); then - #retrieve git svn information - version="${version} svn closest version : $(git log -n 10 | awk '/svn/ {print $2}' | head -1 | sed 's/.*@//')" -fi +# if ( git log -n 1 | grep svn &> /dev/null); then +# #retrieve git svn information +# version="${version} svn : $(git log -n 1 | awk '/svn/ {print $2}' | head -1 | sed 's/.*@//')" +# elif ( git log -n 10 | grep svn &> /dev/null); then +# #retrieve git svn information +# version="${version} svn closest version : $(git log -n 10 | awk '/svn/ {print $2}' | head -1 | sed 's/.*@//')" +# fi -if ( svn info &> /dev/null); then - version=$(svn info | awk '/^Revision:/ {print $NF}') -fi +# if ( svn info &> /dev/null); then +# version=$(svn info | awk '/^Revision:/ {print $NF}') +# fi if [[ ${version} != '' ]]; then echo "Writing version to retroshare/rsversion.h : ${version}" - sed -e "s%RS_REVISION_NUMBER.*%RS_REVISION_NUMBER ${version}%" retroshare/rsversion.in >retroshare/rsversion.h + sed -e "s%RS_REVISION_NUMBER.*%RS_REVISION_NUMBER 0x${version}%" retroshare/rsversion.in >retroshare/rsversion.h fi echo "script version_detail.sh finished normally" exit 0 diff --git a/retroshare-gui/src/rshare.cpp b/retroshare-gui/src/rshare.cpp index 46dbc8c3f..8c049b3c5 100644 --- a/retroshare-gui/src/rshare.cpp +++ b/retroshare-gui/src/rshare.cpp @@ -178,7 +178,7 @@ QString Rshare::retroshareVersion(bool withRevision) { QString version = QString("%1.%2.%3%4").arg(RS_MAJOR_VERSION).arg(RS_MINOR_VERSION).arg(RS_BUILD_NUMBER).arg(RS_BUILD_NUMBER_ADD); if (withRevision) { - version += QString(" %1 %2").arg(tr("Revision")).arg(RS_REVISION_NUMBER); + version += QString(" %1 %2").arg(tr("Revision")).arg(QString::number(RS_REVISION_NUMBER,16)); } return version;