updated version info to new hexa format

This commit is contained in:
csoler 2015-08-02 19:10:59 +02:00
parent 2b8eafa1db
commit 9e978e1442
3 changed files with 14 additions and 14 deletions

View File

@ -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;
}

View File

@ -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

View File

@ -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;