mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-01 18:56:23 -04:00
fix for revision number in ubuntu/debian (patch from heini, untested)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8118 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
81bbb9933d
commit
a4f6500772
5 changed files with 83 additions and 125 deletions
|
@ -1,3 +1,5 @@
|
|||
|
||||
Retroshare Gui version :
|
||||
Svn version : 8013
|
||||
Fr 13. Mär 16:32:53 CET 2015
|
||||
|
||||
|
||||
|
|
|
@ -13,41 +13,18 @@ if (ls &> /dev/null); then
|
|||
fi
|
||||
if ( /usr/bin/git log -n 1 | grep svn &> /dev/null); then
|
||||
#retrieve git svn information
|
||||
echo "Svn version : $(git log -n 1 | grep svn | awk '{print $2}' | head -1)" >> gui/help/version.html
|
||||
echo "Svn version : $(git log -n 1 | awk '/svn/ {print $2}' | head -1)" >> gui/help/version.html
|
||||
elif ( /usr/bin/git log -n 10 | grep svn &> /dev/null); then
|
||||
#retrieve git svn information
|
||||
echo "Svn closest version : $(git log -n 10 | grep svn | awk '{print $2}' | head -1)" >> gui/help/version.html
|
||||
echo "Svn closest version : $(git log -n 10 | awk '/svn/ {print $2}' | head -1)" >> gui/help/version.html
|
||||
fi
|
||||
|
||||
if ( /usr/bin/svn info &> /dev/null); then
|
||||
echo "Svn version : $(svn info | grep '^Revision:')" >> gui/help/version.html
|
||||
echo "Svn version : $(svn info | awk '/^Revision:/ {print $NF}')" >> gui/help/version.html
|
||||
fi
|
||||
date >> gui/help/version.html
|
||||
echo "" >> gui/help/version.html
|
||||
echo "" >> gui/help/version.html
|
||||
fi
|
||||
|
||||
#write the rsguiversion.h file
|
||||
if ( git log -n 1 &> /dev/null); then
|
||||
#retrieve git information
|
||||
version="git : $(git status | grep branch | cut -c 6-) $(git log -n 1 | grep commit)"
|
||||
fi
|
||||
|
||||
if ( git log -n 1 | grep svn &> /dev/null); then
|
||||
#retrieve git svn information
|
||||
version="$version svn : $(git log -n 1 | grep svn | awk '{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 | grep svn | awk '{print $2}' | head -1 | sed 's/.*@//')"
|
||||
fi
|
||||
|
||||
if ( svn info &> /dev/null); then
|
||||
version=$(svn info | grep '^Revision:')
|
||||
fi
|
||||
if [[ $version != '' ]]; then
|
||||
version="$version date : $(date +'%T %m.%d.%y')"
|
||||
echo "Writing version to util/rsguiversion.h : $version "
|
||||
sed -i "s/GUI_REVISION .*/GUI_REVISION \"$version\"/g" util/rsguiversion.h
|
||||
fi
|
||||
echo "version_detail.sh scripts finished"
|
||||
exit 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue