mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge pull request #1340 from sehraf/pr_remove-obsolete-version-scripts
remove obsolete version scripts
This commit is contained in:
commit
eece958aa0
@ -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
|
@ -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
|
@ -1,59 +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 RsBranch=
|
||||
set RsHash=
|
||||
|
||||
pushd "%~dp0"
|
||||
for /f "tokens=1*" %%A in ('"git log --pretty=format:"%%H" --max-count=1"') do set RsHash=%%A
|
||||
for /f "tokens=*" %%A in ('git rev-parse --abbrev-ref HEAD') do set RsBranch=%%A
|
||||
popd
|
||||
|
||||
if "%RsBranch%"=="" (
|
||||
echo Git branch not found.
|
||||
endlocal
|
||||
exit /B 1
|
||||
)
|
||||
if "%RsHash%"=="" (
|
||||
echo Git hash not found.
|
||||
endlocal
|
||||
exit /B 1
|
||||
)
|
||||
|
||||
set RsDate=%date% %TIME%
|
||||
|
||||
:: Create file
|
||||
set InFile=%~dp0gui\help\version.html.in
|
||||
set OutFile=%~dp0gui\help\version.html
|
||||
if exist "%OutFile%" del /Q "%OutFile%"
|
||||
|
||||
for /f "tokens=* delims= " %%a in (%InFile%) do (
|
||||
set line=%%a
|
||||
set line=!line:$Hash$=%RsHash%!
|
||||
set line=!line:$Branch$=%RsBranch%!
|
||||
set line=!line:$Date$=%RsDate%!
|
||||
echo !line!>>"%OutFile%"
|
||||
)
|
||||
|
||||
endlocal
|
||||
exit /B 0
|
@ -1,43 +0,0 @@
|
||||
#!/bin/bash
|
||||
#check if we're on *nix system
|
||||
#write the version.html file
|
||||
|
||||
#don't exit even if a command fails
|
||||
set +e
|
||||
|
||||
pushd $(dirname "$0")
|
||||
|
||||
OLDLANG=${LANG}
|
||||
|
||||
export LANG=C
|
||||
|
||||
SCRIPT_PATH=$(dirname "`readlink -f "${0}"`")
|
||||
|
||||
if (ls &> /dev/null); then
|
||||
echo "Retroshare Gui version : " > ${SCRIPT_PATH}/gui/help/version.html
|
||||
if ( /usr/bin/git log -n 1 &> /dev/null); then
|
||||
#retrieve git information
|
||||
echo "Git version : $(git status | grep branch | head -n 1 | cut -c 4-) $(git log -n 1 | grep commit)" >> ${SCRIPT_PATH}/gui/help/version.html
|
||||
fi
|
||||
if ( /usr/bin/git log -n 1 | grep svn &> /dev/null); then
|
||||
#retrieve git svn information
|
||||
echo "Svn version : $(git log -n 1 | awk '/svn/ {print $2}' | head -1)" >> ${SCRIPT_PATH}/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 | awk '/svn/ {print $2}' | head -1)" >> ${SCRIPT_PATH}/gui/help/version.html
|
||||
fi
|
||||
|
||||
if ( /usr/bin/svn info &> /dev/null); then
|
||||
echo "Svn version : $(svn info | awk '/^Revision:/ {print $NF}')" >> ${SCRIPT_PATH}/gui/help/version.html
|
||||
fi
|
||||
date >> ${SCRIPT_PATH}/gui/help/version.html
|
||||
echo "" >> ${SCRIPT_PATH}/gui/help/version.html
|
||||
echo "" >> ${SCRIPT_PATH}/gui/help/version.html
|
||||
fi
|
||||
|
||||
export LANG=${OLDLANG}
|
||||
|
||||
popd
|
||||
|
||||
echo "version_detail.sh scripts finished"
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user