forked from Maximus5/ConEmu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Internal. Update release version generation scripts (accept build stage)
- Loading branch information
Showing
5 changed files
with
242 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,8 +43,6 @@ bin | |
help | ||
x64 | ||
|
||
/CreateRelease.cmd | ||
|
||
Release/**/*.iobj | ||
Release/**/*.ipdb | ||
Release/**/*.exp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
@echo off | ||
|
||
set ver_info="%~dp0PortableApps\App\AppInfo\appinfo.ini" | ||
set ver_hdr="%~dp0src\ConEmu\version.h" | ||
|
||
|
||
set ConEmuHooks=Enabled | ||
|
||
rem set PATH=%PATH% | ||
set MINGWRT= | ||
if exist %~d0\MinGW\msys\1.0\bin\head.exe set MINGWRT=%~d0\MinGW\msys\1.0\bin | ||
if exist %~d0\MinGW\msys32\bin\head.exe set MINGWRT=%~d0\MinGW\msys32\bin | ||
|
||
set BUILD_NO= | ||
set BUILD_STAGE= | ||
|
||
if "%~1"=="" goto noparm | ||
set BUILD_NO=%~1 | ||
|
||
if /I "%~2" == "ALPHA" ( | ||
set BUILD_STAGE=ALPHA | ||
shift /2 | ||
) else if /I "%~2" == "PREVIEW" ( | ||
set BUILD_STAGE=PREVIEW | ||
shift /2 | ||
) else if /I "%~2" == "STABLE" ( | ||
set BUILD_STAGE=STABLE | ||
shift /2 | ||
) | ||
|
||
:oneparm | ||
|
||
rem check date, must not bee too late or future ;) | ||
set curdt=%DATE% | ||
set curdt=%curdt:~8,2%%curdt:~3,2%%curdt:~0,2% | ||
set /A maxdt=%curdt%+1 | ||
set /A mindt=%curdt%-1 | ||
if "%BUILD_NO:~0,6%" == "%curdt%" goto buildok | ||
if "%BUILD_NO:~0,6%" == "%maxdt%" goto buildok | ||
if "%BUILD_NO:~0,6%" == "%mindt%" goto buildok | ||
echo [1;31;40m------- Warning -------[0m | ||
echo [1;31;40mCheck your build number[0m | ||
echo [1;31;40m Build: %BUILD_NO% [0m | ||
echo [1;31;40m Today: %curdt% [0m | ||
echo [1;31;40m------- Warning -------[0m | ||
pause | ||
:buildok | ||
|
||
|
||
call "%~dp0\src\ConEmu\gen_version.cmd" %BUILD_NO% %BUILD_STAGE% | ||
if errorlevel 1 goto err | ||
|
||
if /I "%~2" == "-build" goto do_build | ||
if /I "%~2" == "-deploy" goto do_deploy | ||
|
||
echo on | ||
|
||
rem Update versions in all release files (msi, portableapps, nuget, etc.) | ||
powershell -noprofile -command "%~dp0Deploy\UpdateDeployVersions.ps1" %BUILD_NO% | ||
if errorlevel 1 goto err | ||
|
||
|
||
rem This will create ".daily.md" | ||
call "%~dp0Deploy\git2log.cmd" -skip_upd | ||
farrun -new_console:b -e5 "%~dp0..\..\ConEmu-GitHub-io\ConEmu.github.io\_posts\.daily.md" | ||
farrun -new_console:b -e23 "%~dp0Release\ConEmu\WhatsNew-ConEmu.txt" | ||
|
||
|
||
rem set ConEmuHooks=OFF | ||
|
||
echo [93;40mVersion from WhatsNew-ConEmu.txt[0m | ||
%MINGWRT%\head -n 30 "%~dp0Release\ConEmu\WhatsNew-ConEmu.txt" | %windir%\system32\find "20%BUILD_NO:~0,2%.%BUILD_NO:~2,2%.%BUILD_NO:~4,2%" | ||
if errorlevel 1 ( | ||
%MINGWRT%\head -n 30 "%~dp0Release\ConEmu\WhatsNew-ConEmu.txt" | %MINGWRT%\tail -n -16 | ||
echo . | ||
echo [1;31;40mBuild number was not described in WhatsNew-ConEmu.txt![0m | ||
echo . | ||
) | ||
|
||
echo [93;40mVersion from PortableApps[0m | ||
type %ver_info% | %MINGWRT%\grep -E "^(PackageVersion|DisplayVersion)" | ||
|
||
echo [93;40mVersion from version.h[0m | ||
type %ver_hdr% | %MINGWRT%\grep -G "^#define MVV_" | ||
|
||
rem Don't wait for confirmation - build number was already confirmed... | ||
rem echo . | ||
rem echo Press Enter to continue if version is OK: "%BUILD_NO%" | ||
rem pause>nul | ||
|
||
:do_build | ||
cd /d "%~dp0src" | ||
|
||
rem touch | ||
call :tch common *.cpp *.hpp *.h | ||
call :tch ConEmu *.cpp *.h | ||
call :tch ConEmuBg *.cpp *.h | ||
call :tch ConEmuC *.cpp *.h | ||
call :tch ConEmuCD *.cpp *.h | ||
call :tch ConEmuDW *.cpp *.h | ||
call :tch ConEmuHk *.cpp *.h | ||
call :tch ConEmuLn *.cpp *.h | ||
call :tch ConEmuPlugin *.cpp *.h | ||
call :tch ConEmuTh *.cpp *.h | ||
|
||
rem Compile x86 | ||
call "%~dp0src\vc.build.release.cmd" 9 x86 nosign | ||
if errorlevel 1 goto err | ||
rem Compile x64 | ||
call "%~dp0src\vc.build.release.cmd" 14 x64 nosign noclean | ||
if errorlevel 1 goto err | ||
rem Sign code | ||
call "%~dp0src\vc.build.release.cmd" dosign | ||
if errorlevel 1 goto err | ||
|
||
:do_deploy | ||
cd /d "%~dp0" | ||
call Deploy\Deploy.cmd %BUILD_NO% | ||
|
||
|
||
|
||
|
||
|
||
goto fin | ||
|
||
|
||
:tch | ||
cd %1 | ||
%MINGWRT%\touch %2 %3 %4 | ||
cd .. | ||
goto :EOF | ||
|
||
:noparm | ||
call "%~dp0Deploy\GetCurVer.cmd" | ||
if "%CurVerBuild%" NEQ "" goto build_found | ||
set curdt=%DATE% | ||
set CurVerBuild=%curdt:~8,2%%curdt:~3,2%%curdt:~0,2% | ||
|
||
:build_found | ||
echo Usage: CreateRelease.cmd ^<Version^> [^<Stage^>] | ||
echo Example: CreateRelease.cmd %CurVerBuild% %CurVerStage% | ||
echo . | ||
set curdt=%DATE% | ||
set CurVerBuild=%curdt:~8,2%%curdt:~3,2%%curdt:~0,2% | ||
set BUILD_NO= | ||
set BUILD_STAGE= | ||
rem Version | ||
set /P BUILD_NO="Deploy build number [%CurVerBuild%]: " | ||
if "%BUILD_NO%" == "" set "BUILD_NO=%CurVerBuild%" | ||
rem Version stage | ||
set /P BUILD_STAGE="Build stage [%CurVerStage%]: " | ||
if "%BUILD_STAGE%" == "" set "BUILD_STAGE=%CurVerStage%" | ||
echo. | ||
|
||
if NOT "%BUILD_NO%"=="" goto oneparm | ||
goto fin | ||
|
||
:err | ||
Echo Deploy FAILED!!! | ||
|
||
:fin | ||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,25 @@ | ||
set /P CurVerBuild=<"%~dp0..\src\ConEmu\version.h" | ||
set CurVerBuild=%CurVerBuild% | ||
set CurVerBuild=%CurVerBuild:~3% | ||
rem echo `%CurVerBuild%` | ||
@set /P CurVerBuild=<"%~dp0..\src\ConEmu\version.h" | ||
@set CurVerBuild=%CurVerBuild% | ||
@set CurVerBuild=%CurVerBuild:~3% | ||
|
||
:stable | ||
@%windir%\system32\find /C "ConEmuVersionStage CEVS_STABLE" "%~dp0..\src\ConEmu\version_stage.h" > nul | ||
@if errorlevel 1 goto preview | ||
@set CurVerStage=STABLE | ||
@goto done | ||
:preview | ||
@%windir%\system32\find /C "ConEmuVersionStage CEVS_PREVIEW" "%~dp0..\src\ConEmu\version_stage.h" > nul | ||
@if errorlevel 1 goto alpha | ||
@set CurVerStage=PREVIEW | ||
@goto done | ||
:alpha | ||
@rem %windir%\system32\find /C "ConEmuVersionStage CEVS_ALPHA" "%~dp0..\src\ConEmu\version_stage.h" > nul | ||
@set CurVerStage=ALPHA | ||
|
||
|
||
:done | ||
|
||
@if "%~1" == "-v" ( | ||
echo CurVerBuild = `%CurVerBuild%` | ||
echo CurVerStage = `%CurVerStage%` | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters