vercom.bat 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. if "%1"=="" goto Usage
  2. set COMPILEERRLOG=%LOGDIR%\compile.err
  3. set COMPILEWARNLOG=%LOGDIR%\compile.wrn
  4. rem
  5. rem Sed requires an escaped string for replacing.
  6. rem
  7. call %SCRIPTDIR%\util\escstr.bat %FEDROOT% ESCAPEDFEDROOT
  8. rem
  9. rem Extract all the error and warning messages out of the compilation log.
  10. rem
  11. findstr /I error %COMPILELOG% > %TEMP%\compile.err
  12. findstr /I warning %COMPILELOG% > %TEMP%\compile.wrn
  13. type %SCRIPTDIR%\verify\compilee.sed | sed s/FEDROOT/%ESCAPEDFEDROOT%/ > %SCRIPTDIR%\verify\compile.err
  14. type %SCRIPTDIR%\verify\compilew.sed | sed s/FEDROOT/%ESCAPEDFEDROOT%/ > %SCRIPTDIR%\verify\compile.wrn
  15. diff %SCRIPTDIR%\verify\compile.err %TEMP%\compile.err > %COMPILEERRLOG%
  16. diff %SCRIPTDIR%\verify\compile.wrn %TEMP%\compile.wrn > %COMPILEWARNLOG%
  17. rem
  18. rem The filesize should be zero if everything went well.
  19. rem
  20. call %SCRIPTDIR%\util\filesize.bat %COMPILEERRLOG% FILESIZE
  21. if "%FILESIZE%"=="0" goto SuccessErr
  22. set BUILDERROR=1
  23. goto AfterErrCheck
  24. :SuccessErr
  25. echo No errors found. > %COMPILEERRLOG%
  26. goto AfterErrCheck
  27. :AfterErrCheck
  28. rem
  29. rem Check for warnings.
  30. rem
  31. call %SCRIPTDIR%\util\filesize.bat %COMPILEWARNLOG% FILESIZE
  32. if "%FILESIZE%"=="0" echo No warnings found. > %COMPILEWARNLOG%
  33. set COMPILEERRLOG=
  34. set COMPILEWARNLOG=
  35. set ESCAPEDFEDROOT=
  36. goto End
  37. :Usage
  38. echo Usage: vercom.bat [build number]
  39. set BUILDERROR=1
  40. goto End
  41. :End