2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-30 14:10:11 +01:00
xash3d-fwgs/gen-version.sh

18 lines
1.2 KiB
Bash
Executable File

git update-index --assume-unchanged res/values/git-rev.xml
echo '<?xml version="1.0" encoding="utf-8"?>' > res/values/git-rev.xml
echo '<resources>' >> res/values/git-rev.xml
echo -n '<string name="git_revisions">' >> res/values/git-rev.xml
echo -n '<b>Version information:</b> ' $*_endl| sed -e s/_endl/'\\n'/ >> res/values/git-rev.xml
echo -n '<b>android:</b>' $(git log --abbrev-commit --pretty=oneline -1) _endl\
'<b>engine:</b>' $(cd jni/src/Xash3D/*/;git log --abbrev-commit --pretty=oneline -1) _endl\
'<b>client:</b>' $(cd jni/src/XashXT/*/;git log --abbrev-commit --pretty=oneline -1) _endl\
'<b>halflife:</b>' $(cd jni/src/HLSDK/*/;git log --abbrev-commit --pretty=oneline -1) _endl\
'<b>SDL2:</b>' $(cd jni/src/SDL2/*/;git log --abbrev-commit --pretty=oneline -1) _endl\
'<b>TouchControls:</b>' $(cd jni/src/MobileTouchControls/*/;git log --abbrev-commit --pretty=oneline -1) _endl\
'<b>nanogl:</b>' $(cd jni/src/NanoGL/*/;git log --abbrev-commit --pretty=oneline -1)_endl\
| sed -e s/\'//g -e s/_endl/'\\n'/g >> res/values/git-rev.xml
echo -n $USER@$(hostname) $(date +%H:%M:%S-%d-%m-%y) >> res/values/git-rev.xml
echo '</string>' >> res/values/git-rev.xml
echo '</resources>' >> res/values/git-rev.xml
cat res/values/git-rev.xml