mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-10 07:32:42 -04:00
rewrite script to include them in the make file. Use both util/rsversion.h and gui/help/version.html for gui version information
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1473 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
19de883705
commit
96f2d92ee7
8 changed files with 88 additions and 51 deletions
23
libretroshare/src/version_detail.sh
Executable file
23
libretroshare/src/version_detail.sh
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
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 | head -n 5 | tail -1)
|
||||
fi
|
||||
if [[ $version != '' ]]; then
|
||||
version="$version date : $(date +'%T %m.%d.%y')"
|
||||
echo "Writing version to util/rsversion.h : $version "
|
||||
sed -i "s/LIB_VERSION .*/LIB_VERSION \"$version\"/g" util/rsversion.h
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue