Browse Source

Update 'GIN_sync_windows.bat'

julien colomb 3 years ago
parent
commit
d5bec1cebd
1 changed files with 21 additions and 2 deletions
  1. 21 2
      GIN_sync_windows.bat

+ 21 - 2
GIN_sync_windows.bat

@@ -1,14 +1,33 @@
+:: Double click me to synchornise changes between the windows computer and the server, large files will not be downloaded 
+:: To allow large file download, please erase the :: sign in line 31-32 and save the file
+:: use sync if you are on a mac or linux computer
+::
+::
 :: Upload changes from inside repository using GIN CLI
 :: Assumes no submodules
 
+:checkerror
+    err=%1
+    msg=%2
+    if %err% NEQ 0 (
+
+    )
+EXIT /B
 
 set curdir=%~dp0
 for /f %%i in ('git -C %curdir% rev-parse --show-toplevel') do set projectdir=%%i
 
-cd %projectdir%
-gin download
 
+
+cd %projectdir%
+gin sync
+CALL :checkerror %ERRORLEVEL% "Error occurred during 'gin sync'"
 gin commit .
+CALL :checkerror %ERRORLEVEL% "Error occurred during 'gin commit'"
 gin upload
+CALL :checkerror %ERRORLEVEL% "Error occurred during 'gin upload'"
 
+:: Uncomment below to download all large files
+:: gin get-content .
+:: CALL :checkerror %ERRORLEVEL% "Error occurred during 'gin get-content'"
 pause