Guest User

ArmA Jenkins PBO build batchfile

a guest
Jan 5th, 2014
308
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. echo Starting build...
  3. forfiles /p %WORKSPACE%\..\%JOB_NAME%_binned /c "cmd /c del @PATH /f /q"
  4. echo Deleted old binned files
  5. REM Copy over the PBO files to the binned file. Repeat this command for all your PBO's.
  6. xcopy %WORKSPACE%\my_pbo %WORKSPACE%\..\%JOB_NAME%_binned\my_pbo /e /i /q
  7. echo Copied over folder to binned folder
  8. forfiles /p %WORKSPACE%\..\%JOB_NAME%_binned /c "cmd /c ..\buildpboprefix.bat @FILE @PATH %BUILD_NUMBER%"
  9. echo Made pboprefix files
  10. forfiles /p %WORKSPACE%\..\%JOB_NAME%_binned /c "cmd /c ..\binarize.exe -silent @PATH @PATH >nul 2>&1"
  11. forfiles /p %WORKSPACE%\..\%JOB_NAME%_binned /s /m model.cfg /c "cmd /c del @PATH /f /q"
  12. echo Binarised models
  13. forfiles /p %WORKSPACE%\..\%JOB_NAME%_binned /c "cmd /c ..\makepbo.exe -PBDX none @PATH >nul"
  14. echo Created PBOs
  15. forfiles /p %WORKSPACE%\..\%JOB_NAME%_binned /c "cmd /c if @ISDIR==TRUE rmdir /s /q @PATH"
  16. echo Removed binned folders
  17. REM I like to keep a version file with all relevant information to keep track, you can remove this if you dont want it
  18. echo BUILD NR: %BUILD_NUMBER% > %WORKSPACE%\..\%JOB_NAME%_binned\version.txt
  19. echo COMMIT: %GIT_COMMIT% >> %WORKSPACE%\..\%JOB_NAME%_binned\version.txt
  20. echo BRANCH: %GIT_BRANCH% >> %WORKSPACE%\..\%JOB_NAME%_binned\version.txt
  21. echo BUILD INFO: %BUILD_URL% >> %WORKSPACE%\..\%JOB_NAME%_binned\version.txt
  22. REM Repeat the following if for your other pbos to make sure the build fails if one of the pbos hasnt been build
  23. if not exist %WORKSPACE%\..\%JOB_NAME%_binned\my_pbo.pbo exit /b 1
RAW Paste Data