sync.bat 809 B

123456789101112131415161718192021222324252627282930
  1. :: Upload changes from inside repository using GIN CLI
  2. :: Assumes no submodules
  3. :checkerror
  4. err=%1
  5. msg=%2
  6. if %err% NEQ 0 (
  7. )
  8. EXIT /B
  9. set curdir=%~dp0
  10. for /f %%i in ('git -C %curdir% rev-parse --show-toplevel') do set projectdir=%%i
  11. cd %projectdir%
  12. gin sync
  13. CALL :checkerror %ERRORLEVEL% "Error occurred during 'gin sync'"
  14. gin commit .
  15. CALL :checkerror %ERRORLEVEL% "Error occurred during 'gin commit'"
  16. gin upload
  17. CALL :checkerror %ERRORLEVEL% "Error occurred during 'gin upload'"
  18. gin remove-content
  19. CALL :checkerror %ERRORLEVEL% "Error occurred during 'gin remove-content'"
  20. :: Uncomment below to download all large files, and comment the gin remove-content lines above to keep them.
  21. :: gin get-content .
  22. :: CALL :checkerror %ERRORLEVEL% "Error occurred during 'gin get-content'"
  23. pause