GIN_sync_windows.bat 920 B

123456789101112131415161718192021222324252627282930313233
  1. :: Double click me to synchornise changes between the windows computer and the server, large files will not be downloaded
  2. :: To allow large file download, please erase the :: sign in line 31-32 and save the file
  3. :: use sync if you are on a mac or linux computer
  4. ::
  5. ::
  6. :: Upload changes from inside repository using GIN CLI
  7. :: Assumes no submodules
  8. :checkerror
  9. err=%1
  10. msg=%2
  11. if %err% NEQ 0 (
  12. )
  13. EXIT /B
  14. set curdir=%~dp0
  15. for /f %%i in ('git -C %curdir% rev-parse --show-toplevel') do set projectdir=%%i
  16. cd %projectdir%
  17. gin sync
  18. CALL :checkerror %ERRORLEVEL% "Error occurred during 'gin sync'"
  19. gin commit .
  20. CALL :checkerror %ERRORLEVEL% "Error occurred during 'gin commit'"
  21. gin upload
  22. CALL :checkerror %ERRORLEVEL% "Error occurred during 'gin upload'"
  23. :: Uncomment below to download all large files
  24. :: gin get-content .
  25. :: CALL :checkerror %ERRORLEVEL% "Error occurred during 'gin get-content'"
  26. pause