You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
1.8 KiB

  1. @echo off
  2. SET TAR=Release_Build
  3. SET CSharpBuilder="dotnet build --configuration Release"
  4. SET CUR=%CD%
  5. REM Remove old release folder
  6. rmdir /Q /S %TAR%
  7. cd Stamp
  8. RVStampCore.exe
  9. cd ..
  10. for /f %%f in ('dir /s /b *.sln') do call:BuildSLN %%f
  11. for /f %%f in ('dir /AD /b .') do call:MoveRelease %%f
  12. IF EXIST %TAR% (call:CleanProcess)
  13. for /f %%f in ('dir /s /b /a:d obj') do call:CleanProject %%f
  14. for /f %%f in ('dir /s /b /a:d bin') do call:CleanProject %%f
  15. ::--------------------------------------------------------
  16. ::-- Function to Build
  17. ::--------------------------------------------------------
  18. :CleanProject - here starts my function identified by it's label
  19. echo.
  20. echo. Cleaning %~1
  21. IF EXIST %~1 (rmdir /Q /S %~1)
  22. goto:eof
  23. ::--------------------------------------------------------
  24. ::-- Function to Build Project
  25. ::--------------------------------------------------------
  26. :MoveRelease - here starts my function identified by it's label
  27. echo.
  28. echo. Move Release %~1
  29. IF NOT "%~1" == "eModule" (
  30. IF NOT "%~1" == "packages" (
  31. IF NOT "%~1" == "%TAR%" (
  32. mkdir %TAR%
  33. mkdir %TAR%\%~1
  34. XCOPY %~1\bin\Release %TAR%\%~1 /E /Y /I
  35. )
  36. )
  37. )
  38. goto:eof
  39. ::--------------------------------------------------------
  40. ::-- Function to SLN
  41. ::--------------------------------------------------------
  42. :BuildSLN - here starts my function identified by it's label
  43. echo.
  44. echo. Build SLN %~1
  45. dotnet build --configuration Release
  46. goto:eof
  47. ::--------------------------------------------------------
  48. ::-- Function to Clean
  49. ::--------------------------------------------------------
  50. :CleanProcess - here starts my function identified by it's label
  51. echo.
  52. echo. CleanProcess
  53. CD /D %TAR%
  54. del /Q /S *.pdb
  55. del /Q /S *.vshost.*
  56. del /Q /S *.bak
  57. del /Q /S *.map
  58. del /Q /S *.scss
  59. del /Q /S *.bat
  60. del Readme.txt
  61. del TODO.txt
  62. CD /D %CUR%
  63. goto:eof