diff options
author | Oliver Schneider <oliver@assarbad.net> | 2015-11-15 02:28:49 +0300 |
---|---|---|
committer | Oliver Schneider <oliver@assarbad.net> | 2015-11-15 02:28:49 +0300 |
commit | be6e37ee850e33c193040d927d4d04f52c7d0b21 (patch) | |
tree | 762b5cae40ea23922fbc88c1d6f7afc62f64083c | |
parent | a20251ef1bb9516ab8dc26cc5039d61a5e6a65dc (diff) |
Amended the release script to also take care of renaming the signed build and also creating a detached PGP signature
--HG--
branch : WDS-build
-rw-r--r-- | release.cmd | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/release.cmd b/release.cmd index ae47122..13493f6 100644 --- a/release.cmd +++ b/release.cmd @@ -4,8 +4,27 @@ setlocal ENABLEEXTENSIONS & pushd . call setvcvars.cmd 8.0
if NOT defined VCVER_FRIENDLY echo Unfortunately setvcvars.cmd didn't do its job. Fix the problem and run this script again.&goto :EOF
set HGTIPFILE="%~dp0src\host\hgtip.h"
-for /f %%i in ('hg id -i -r tip') do @echo #define HG_TIP_ID "%%i" > %HGTIPFILE%
-for /f %%i in ('hg id -n -r tip') do @echo #define HG_TIP_REVNO "%%i" >> %HGTIPFILE%
+for /f %%i in ('hg id -i -r tip') do @call :SetVar HG_TIP_ID "%%i"
+for /f %%i in ('hg id -n -r tip') do @call :SetVar HG_TIP_REVNO "%%i"
+echo #define HG_TIP_ID "%HG_TIP_ID%" > %HGTIPFILE%
+echo #define HG_TIP_REVNO "%HG_TIP_REVNO%" >> %HGTIPFILE%
if exist %HGTIPFILE% type %HGTIPFILE%
vcbuild /rebuild /time Premake4.vs8.sln "Publish|Win32"
+copy /y "%~dp0bin\release\premake4.exe" "%~dp0premake4.rev-%HG_TIP_ID%-%HG_TIP_REVNO%.exe"
+sigcheck -a "%~dp0premake4.rev-%HG_TIP_ID%-%HG_TIP_REVNO%.exe"
+gpg2 -bao "%~dp0premake4.rev-%HG_TIP_ID%-%HG_TIP_REVNO%.exe.asc" "%~dp0premake4.rev-%HG_TIP_ID%-%HG_TIP_REVNO%.exe"
popd & endlocal & goto :EOF
+goto :EOF
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::: / SetVar subroutine
+::: Param1 == name of the variable, Param2 == value to be set for the variable
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:SetVar
+:: Get the name of the variable we are working with
+setlocal ENABLEEXTENSIONS&set VAR_NAME=%1
+endlocal & set %VAR_NAME%=%~2
+goto :EOF
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::: \ SetVar subroutine
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|