G10h4ck said that there are obsolete since #1336 and should not be used anymore.

This commit is contained in:
sehraf 2018-09-14 17:01:52 +02:00
parent 7784660d67
commit 1faaf91ebe
No known key found for this signature in database
GPG key ID: DF09F6EAE356B2C6
4 changed files with 0 additions and 191 deletions

View file

@ -1,48 +0,0 @@
@echo off
setlocal enabledelayedexpansion
:: Search git in PATH
set GitPath=
for %%P in ("%PATH:;=" "%") do (
if exist "%%~P.\git.exe" (
set GitPath=%%~P
goto found_git
)
)
:found_git
if "%GitPath%"=="" (
echo git not found in PATH. Version update cancelled.
endlocal
exit /B 0
)
echo Update version
:: Retrieve git information
set RsHash=
pushd "%~dp0"
for /f "tokens=1*" %%A in ('"git log --pretty=format:"%%H" --max-count=1"') do set RsHash=%%A
popd
if "%RsHash%"=="" (
echo Git hash not found.
endlocal
exit /B 1
)
:: Create file
set InFile=%~dp0retroshare\rsversion.in
set OutFile=%~dp0retroshare\rsversion.h
if exist "%OutFile%" del /Q "%OutFile%"
for /f "tokens=* delims= " %%a in (%InFile%) do (
set line=%%a
set line=!line:$REV$=%RsHash:~0,8%!
echo !line!>>"%OutFile%"
)
endlocal
exit /B 0

View file

@ -1,41 +0,0 @@
#!/bin/bash
#don't exit even if a command fails
set +e
pushd $(dirname "$0")
SCRIPT_PATH=$(dirname "`readlink -f "${0}"`")
OLDLANG=${LANG}
export LANG=C
if ( git log -n 1 &> /dev/null); then
#retrieve git information
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 ( 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 0x${version}%" ${SCRIPT_PATH}/retroshare/rsversion.in >${SCRIPT_PATH}/retroshare/rsversion.h
fi
export LANG=${OLDLANG}
popd
echo "script version_detail.sh finished normally"
exit 0