Index: scripts/jenkins/_get-output-dir.bat =================================================================== diff -u --- scripts/jenkins/_get-output-dir.bat (revision 0) +++ scripts/jenkins/_get-output-dir.bat (revision 8c55893d07674cfbceb5f9b245bf887d8e7079bb) @@ -0,0 +1,11 @@ +@echo off + +call "%WORKSPACE%\scripts\jenkins\_get-version.bat" || exit /b 1 + +if "%CHDetailVersion%" == "0" ( + SET OutDir=%WORKSPACE%\Output\%CHTextVersion% +) else ( + SET OutDir=%WORKSPACE%\Output\internal\%CHTextVersion% +) + +mkdir "%OutDir%" || exit /b 0 Index: scripts/jenkins/prepare-installer-package.bat =================================================================== diff -u -re3ca590faeb93bd54ca09d12929181c08c2dc180 -r8c55893d07674cfbceb5f9b245bf887d8e7079bb --- scripts/jenkins/prepare-installer-package.bat (.../prepare-installer-package.bat) (revision e3ca590faeb93bd54ca09d12929181c08c2dc180) +++ scripts/jenkins/prepare-installer-package.bat (.../prepare-installer-package.bat) (revision 8c55893d07674cfbceb5f9b245bf887d8e7079bb) @@ -1,8 +1,5 @@ @echo off -call "%WORKSPACE%\scripts\jenkins\_get-version.bat" || exit /b 1 +call "%WORKSPACE%\scripts\jenkins\_get-output-dir.bat" || exit /b 1 -SET OutDir=%WORKSPACE%\Output\%CHTextVersion% -mkdir "%OutDir%" - "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" "%WORKSPACE%\scripts\setup.iss" /o"%OutDir%" Index: scripts/jenkins/prepare-portable-package.bat =================================================================== diff -u -re3ca590faeb93bd54ca09d12929181c08c2dc180 -r8c55893d07674cfbceb5f9b245bf887d8e7079bb --- scripts/jenkins/prepare-portable-package.bat (.../prepare-portable-package.bat) (revision e3ca590faeb93bd54ca09d12929181c08c2dc180) +++ scripts/jenkins/prepare-portable-package.bat (.../prepare-portable-package.bat) (revision 8c55893d07674cfbceb5f9b245bf887d8e7079bb) @@ -1,15 +1,13 @@ @echo off rem Script prepares the portable CH package after build -call "%WORKSPACE%\scripts\jenkins\_get-version.bat" || exit /b 1 +call "%WORKSPACE%\scripts\jenkins\_get-output-dir.bat" || exit /b 1 SET TmpDir=%WORKSPACE%\temp\chzip-%BUILD_NUMBER% -SET OutDir=%WORKSPACE%\Output\%CHTextVersion% SET VSInstallDirX86=C:\Program Files (x86)\Microsoft Visual Studio 12.0 mkdir "%TmpDir%" -mkdir "%OutDir%" xcopy "%WORKSPACE%\bin\release\ch.exe" "%TmpDir%\32bit\" || exit /B 1 xcopy "%WORKSPACE%\License.txt" "%TmpDir%\32bit\" || exit /B 1 Index: scripts/jenkins/prepare-source-package.bat =================================================================== diff -u -re3ca590faeb93bd54ca09d12929181c08c2dc180 -r8c55893d07674cfbceb5f9b245bf887d8e7079bb --- scripts/jenkins/prepare-source-package.bat (.../prepare-source-package.bat) (revision e3ca590faeb93bd54ca09d12929181c08c2dc180) +++ scripts/jenkins/prepare-source-package.bat (.../prepare-source-package.bat) (revision 8c55893d07674cfbceb5f9b245bf887d8e7079bb) @@ -1,8 +1,5 @@ @echo off -call "%WORKSPACE%\scripts\jenkins\_get-version.bat" || exit /b 1 +call "%WORKSPACE%\scripts\jenkins\_get-output-dir.bat" || exit /b 1 -SET OutDir=%WORKSPACE%\Output\%CHTextVersion% -mkdir "%OutDir%" - "C:\Program Files\7-Zip\7z.exe" a "%OutDir%\chsrc-%CHTextVersion%.zip" -tzip -x!".git" -x!"temp" -x!"Output" "%WORKSPACE%\*" Index: scripts/jenkins/prepare-symbols-package.bat =================================================================== diff -u -re3ca590faeb93bd54ca09d12929181c08c2dc180 -r8c55893d07674cfbceb5f9b245bf887d8e7079bb --- scripts/jenkins/prepare-symbols-package.bat (.../prepare-symbols-package.bat) (revision e3ca590faeb93bd54ca09d12929181c08c2dc180) +++ scripts/jenkins/prepare-symbols-package.bat (.../prepare-symbols-package.bat) (revision 8c55893d07674cfbceb5f9b245bf887d8e7079bb) @@ -1,8 +1,5 @@ @echo off -call "%WORKSPACE%\scripts\jenkins\_get-version.bat" || exit /b 1 +call "%WORKSPACE%\scripts\jenkins\_get-output-dir.bat" || exit /b 1 -SET OutDir=%WORKSPACE%\Output\%CHTextVersion% -mkdir "%OutDir%" - "C:\Program Files\7-Zip\7z.exe" a "%OutDir%\chsymbols-%CHTextVersion%.zip" -tzip "%WORKSPACE%\bin\release\*.pdb" Index: scripts/jenkins/sign-installer-binary.bat =================================================================== diff -u -r993762d9f45b4fa3a49582675dd0aaf3a82513b9 -r8c55893d07674cfbceb5f9b245bf887d8e7079bb --- scripts/jenkins/sign-installer-binary.bat (.../sign-installer-binary.bat) (revision 993762d9f45b4fa3a49582675dd0aaf3a82513b9) +++ scripts/jenkins/sign-installer-binary.bat (.../sign-installer-binary.bat) (revision 8c55893d07674cfbceb5f9b245bf887d8e7079bb) @@ -1,6 +1,5 @@ @echo off -call "%WORKSPACE%\scripts\jenkins\_get-version.bat" || exit /b 1 -SET OutDir=%WORKSPACE%\Output\%CHTextVersion% +call "%WORKSPACE%\scripts\jenkins\_get-output-dir.bat" || exit /b 1 signtool sign /t http://time.certum.pl /a "%OutDir%\*.exe" Index: scripts/jenkins/update-code-version.bat =================================================================== diff -u -r4ed6512d73cd1b444f83afdefe9a986b6ca9de90 -r8c55893d07674cfbceb5f9b245bf887d8e7079bb --- scripts/jenkins/update-code-version.bat (.../update-code-version.bat) (revision 4ed6512d73cd1b444f83afdefe9a986b6ca9de90) +++ scripts/jenkins/update-code-version.bat (.../update-code-version.bat) (revision 8c55893d07674cfbceb5f9b245bf887d8e7079bb) @@ -9,14 +9,16 @@ rem Detect new version type if "%GIT_TAG_NAME%" == "" ( rem internal build - SET _CHStrVersion=%CHMajorVersion%.%CHMinorVersion%git-%GIT_COMMIT:~-6% + SET _CHStrVersion=%CHMajorVersion%.%CHMinorVersion%-%BUILD_NUMBER%-%GIT_COMMIT:~-6% + SET _CHDetailVersion=1 ) else ( rem tagged build SET _CHStrVersion=%GIT_TAG_NAME% + SET _CHDetailVersion=0 ) echo String version: %_CHStrVersion% -echo Numeric ver: %CHMajorVersion%.%CHMinorVersion%.%BUILD_NUMBER%.0 +echo Numeric ver: %CHMajorVersion%.%CHMinorVersion%.%BUILD_NUMBER%.%_CHDetailVersion% echo Changing version -cscript //NoLogo "%WORKSPACE%\scripts\jenkins\_replace_version.vbs" "%WORKSPACE%\src\common\version.h.template" "%WORKSPACE%\src\common\version.h" %CHMajorVersion% %CHMinorVersion% %BUILD_NUMBER% 0 %_CHStrVersion% +cscript //NoLogo "%WORKSPACE%\scripts\jenkins\_replace_version.vbs" "%WORKSPACE%\src\common\version.h.template" "%WORKSPACE%\src\common\version.h" %CHMajorVersion% %CHMinorVersion% %BUILD_NUMBER% %_CHDetailVersion% %_CHStrVersion%