mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-06 13:24:16 -04:00
Windows build environment
- Fixed creating git-log - Added generating of changelog from MSYS2 build
This commit is contained in:
parent
b130ab2b0d
commit
08955c0818
6 changed files with 71 additions and 10 deletions
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…
Add table
Add a link
Reference in a new issue