mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-12 16:09:37 -05:00
updated version info to new hexa format
This commit is contained in:
parent
2b8eafa1db
commit
9e978e1442
@ -12,7 +12,7 @@
|
|||||||
std::string RsUtil::retroshareVersion()
|
std::string RsUtil::retroshareVersion()
|
||||||
{
|
{
|
||||||
std::string version;
|
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;
|
return version;
|
||||||
}
|
}
|
||||||
|
@ -5,24 +5,24 @@ set +e
|
|||||||
|
|
||||||
if ( git log -n 1 &> /dev/null); then
|
if ( git log -n 1 &> /dev/null); then
|
||||||
#retrieve git information
|
#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
|
fi
|
||||||
|
|
||||||
if ( git log -n 1 | grep svn &> /dev/null); then
|
# if ( git log -n 1 | grep svn &> /dev/null); then
|
||||||
#retrieve git svn information
|
# #retrieve git svn information
|
||||||
version="${version} svn : $(git log -n 1 | awk '/svn/ {print $2}' | head -1 | sed 's/.*@//')"
|
# 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
|
# elif ( git log -n 10 | grep svn &> /dev/null); then
|
||||||
#retrieve git svn information
|
# #retrieve git svn information
|
||||||
version="${version} svn closest version : $(git log -n 10 | awk '/svn/ {print $2}' | head -1 | sed 's/.*@//')"
|
# version="${version} svn closest version : $(git log -n 10 | awk '/svn/ {print $2}' | head -1 | sed 's/.*@//')"
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
if ( svn info &> /dev/null); then
|
# if ( svn info &> /dev/null); then
|
||||||
version=$(svn info | awk '/^Revision:/ {print $NF}')
|
# version=$(svn info | awk '/^Revision:/ {print $NF}')
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
if [[ ${version} != '' ]]; then
|
if [[ ${version} != '' ]]; then
|
||||||
echo "Writing version to retroshare/rsversion.h : ${version}"
|
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
|
fi
|
||||||
echo "script version_detail.sh finished normally"
|
echo "script version_detail.sh finished normally"
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -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);
|
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) {
|
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;
|
return version;
|
||||||
|
Loading…
Reference in New Issue
Block a user