mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-25 14:56:28 -05:00
Windows build environment
- Fixed creating git-log - Added generating of changelog from MSYS2 build
This commit is contained in:
parent
b130ab2b0d
commit
08955c0818
@ -67,6 +67,14 @@ if exist "%EnvJomExe%" (
|
|||||||
) else (
|
) else (
|
||||||
mingw32-make
|
mingw32-make
|
||||||
)
|
)
|
||||||
|
if errorlevel 1 goto error
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo === Changelog
|
||||||
|
echo.
|
||||||
|
|
||||||
|
title Build - %SourceName%-%RsBuildConfig% [changelog]
|
||||||
|
call "%ToolsPath%\generate-changelog.bat" "%SourcePath%" "%RsBuildPath%\changelog.txt"
|
||||||
|
|
||||||
:error
|
:error
|
||||||
popd
|
popd
|
||||||
|
@ -4,6 +4,7 @@ set ParamDebug=0
|
|||||||
set ParamAutologin=0
|
set ParamAutologin=0
|
||||||
set ParamPlugins=0
|
set ParamPlugins=0
|
||||||
set ParamTor=0
|
set ParamTor=0
|
||||||
|
set NonInteractive=0
|
||||||
|
|
||||||
:parameter_loop
|
:parameter_loop
|
||||||
if "%~1" NEQ "" (
|
if "%~1" NEQ "" (
|
||||||
@ -18,6 +19,8 @@ if "%~1" NEQ "" (
|
|||||||
set ParamPlugins=1
|
set ParamPlugins=1
|
||||||
) else if "%%~a"=="tor" (
|
) else if "%%~a"=="tor" (
|
||||||
set ParamTor=1
|
set ParamTor=1
|
||||||
|
) else if "%%~a"=="non-interactive" (
|
||||||
|
set NonInteractive=1
|
||||||
) else (
|
) else (
|
||||||
echo.
|
echo.
|
||||||
echo Unknown parameter %1
|
echo Unknown parameter %1
|
||||||
@ -99,4 +102,7 @@ echo.
|
|||||||
echo Parameter for pack
|
echo Parameter for pack
|
||||||
echo tor Pack tor version
|
echo tor Pack tor version
|
||||||
echo.
|
echo.
|
||||||
|
echo Parameter for git-log
|
||||||
|
echo non-interactive Non-interactive mode
|
||||||
|
echo.
|
||||||
exit /B 2
|
exit /B 2
|
||||||
|
@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
set NoAsk=
|
|
||||||
if "%~2"=="no-ask" set NoAsk=1
|
|
||||||
|
|
||||||
:: Initialize environment
|
:: Initialize environment
|
||||||
call "%~dp0..\env.bat"
|
call "%~dp0..\env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
@ -52,7 +49,7 @@ set RsLastRefFile=%BuildPath%\Qt-%QtVersion%-%GCCArchitecture%%RsType%-%RsBuildC
|
|||||||
set RsLastRef=
|
set RsLastRef=
|
||||||
if exist "%RsLastRefFile%" set /P RsLastRef=<"%RsLastRefFile%"
|
if exist "%RsLastRefFile%" set /P RsLastRef=<"%RsLastRefFile%"
|
||||||
|
|
||||||
if "%NoAsk%"=="1" goto no_ask_for_last_revision
|
if "%NonInteractive%"=="1" goto no_ask_for_last_revision
|
||||||
if not "%RsLastRef%"=="" echo Last Revision was %RsLastRef%
|
if not "%RsLastRef%"=="" echo Last Revision was %RsLastRef%
|
||||||
set /P RsLastRefInput=Last Revision:
|
set /P RsLastRefInput=Last Revision:
|
||||||
if "%RsLastRefInput%" NEQ "" set RsLastRef=%RsLastRefInput%
|
if "%RsLastRefInput%" NEQ "" set RsLastRef=%RsLastRefInput%
|
||||||
@ -70,7 +67,7 @@ echo.
|
|||||||
echo Creating log from %RsLastRef%
|
echo Creating log from %RsLastRef%
|
||||||
echo to %RsRef%
|
echo to %RsRef%
|
||||||
|
|
||||||
if "%NoAsk%"=="1" goto no_confirm
|
if "%NonInteractive%"=="1" goto no_confirm
|
||||||
choice /M "Do you want to proceed?"
|
choice /M "Do you want to proceed?"
|
||||||
if %errorlevel%==2 exit /B 1
|
if %errorlevel%==2 exit /B 1
|
||||||
:no_confirm
|
:no_confirm
|
||||||
|
@ -165,8 +165,8 @@ if "%QtMainVersion%"=="5" (
|
|||||||
echo copy bdboot.txt
|
echo copy bdboot.txt
|
||||||
copy "%SourcePath%\libbitdht\src\bitdht\bdboot.txt" "%RsDeployPath%" %Quite%
|
copy "%SourcePath%\libbitdht\src\bitdht\bdboot.txt" "%RsDeployPath%" %Quite%
|
||||||
|
|
||||||
rem echo copy changelog.txt
|
echo copy changelog.txt
|
||||||
rem copy "%SourcePath%\retroshare-gui\src\changelog.txt" "%RsDeployPath%" %Quite%
|
copy "%RsBuildPath%\changelog.txt" "%RsDeployPath%" %Quite%
|
||||||
|
|
||||||
if exist "%SourcePath%\libresapi\src\webui" (
|
if exist "%SourcePath%\libresapi\src\webui" (
|
||||||
echo copy webui
|
echo copy webui
|
||||||
|
@ -110,8 +110,8 @@ Var StyleSheetDir
|
|||||||
!define MUI_FINISHPAGE_LINK "Visit the RetroShare forum for the latest news and support"
|
!define MUI_FINISHPAGE_LINK "Visit the RetroShare forum for the latest news and support"
|
||||||
!define MUI_FINISHPAGE_LINK_LOCATION "http://retroshare.sourceforge.net/forum/"
|
!define MUI_FINISHPAGE_LINK_LOCATION "http://retroshare.sourceforge.net/forum/"
|
||||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\retroshare.exe"
|
!define MUI_FINISHPAGE_RUN "$INSTDIR\retroshare.exe"
|
||||||
;!define MUI_FINISHPAGE_SHOWREADME $INSTDIR\changelog.txt
|
!define MUI_FINISHPAGE_SHOWREADME $INSTDIR\changelog.txt
|
||||||
;!define MUI_FINISHPAGE_SHOWREADME_TEXT changelog.txt
|
!define MUI_FINISHPAGE_SHOWREADME_TEXT changelog.txt
|
||||||
;!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
;!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
||||||
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
|
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
|
||||||
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
|
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
|
||||||
@ -230,7 +230,7 @@ Section $(Section_Main) Section_Main
|
|||||||
!endif
|
!endif
|
||||||
|
|
||||||
; Other files
|
; Other files
|
||||||
; File "${SOURCEDIR}\retroshare-gui\src\changelog.txt"
|
File "${RELEASEDIR}\changelog.txt"
|
||||||
File "${SOURCEDIR}\libbitdht\src\bitdht\bdboot.txt"
|
File "${SOURCEDIR}\libbitdht\src\bitdht\bdboot.txt"
|
||||||
|
|
||||||
; License
|
; License
|
||||||
|
50
build_scripts/Windows/tools/generate-changelog.bat
Normal file
50
build_scripts/Windows/tools/generate-changelog.bat
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal enabledelayedexpansion
|
||||||
|
|
||||||
|
if "%~2"=="" (
|
||||||
|
echo.
|
||||||
|
echo Parameter error.
|
||||||
|
echo Usage %~n0 sourcepath outputfile
|
||||||
|
exit /B 1
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Check git executable
|
||||||
|
set GitPath=
|
||||||
|
call "%~dp0find-in-path.bat" GitPath git.exe
|
||||||
|
if "%GitPath%"=="" echo Git executable not found in PATH.& exit /B 1
|
||||||
|
|
||||||
|
set logfile=%~2
|
||||||
|
copy nul %logfile% > nul
|
||||||
|
|
||||||
|
pushd %~1
|
||||||
|
|
||||||
|
set last=HEAD
|
||||||
|
for /f %%t in ('git tag --sort=-taggerdate --merged ^| findstr v') do (
|
||||||
|
echo generating changelog for !last!..%%t
|
||||||
|
echo ----------------------------------------------- >> %logfile%
|
||||||
|
if !last! neq HEAD (
|
||||||
|
git tag -n !last! >> %logfile%
|
||||||
|
) else (
|
||||||
|
echo HEAD >> %logfile%
|
||||||
|
)
|
||||||
|
rem echo !last! ---^> %%t >> %logfile%
|
||||||
|
echo ----------------------------------------------- >> %logfile%
|
||||||
|
echo. >> %logfile%
|
||||||
|
git log %%t..!last! --no-merges "--pretty=format:%%h %%ai %%<(10,trunc)%%an %%s" >> %logfile%
|
||||||
|
echo. >> %logfile%
|
||||||
|
echo. >> %logfile%
|
||||||
|
set last=%%t
|
||||||
|
)
|
||||||
|
|
||||||
|
echo generating changelog for %last%
|
||||||
|
echo ----------------------------------------------- >> %logfile%
|
||||||
|
git tag -n %last% >> %logfile%
|
||||||
|
echo ----------------------------------------------- >> %logfile%
|
||||||
|
echo. >> %logfile%
|
||||||
|
git log %last% --no-merges "--pretty=format:%%h %%ai %%<(10,trunc)%%an %%s" >> %logfile%
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
endlocal enabledelayedexpansion
|
||||||
|
|
||||||
|
exit /B 0
|
Loading…
x
Reference in New Issue
Block a user