datalad.bat 624 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. :: Upload changes from inside repository using GIN CLI
  2. :checkerror
  3. err=%1
  4. msg=%2
  5. if %err% NEQ 0 (
  6. )
  7. EXIT /B
  8. set curdir=%~dp0
  9. for /f %%i in ('git -C %curdir% rev-parse --show-toplevel') do set projectdir=%%i
  10. cd %projectdir%
  11. datalad get . -n -r
  12. datalad update -r --how=merge
  13. echo "Enter a commit message:"
  14. set /p input=
  15. :: sync
  16. datalad update -r --how=merge
  17. datalad save -r -m %input%
  18. datalad push -r
  19. set /p qanswer="Do you want to drop all files that were uploaded, they will be on the server but not on this computer anymore ? [y/n] "
  20. if /i "%input%" == "yes" (
  21. datalad drop . -r
  22. )
  23. pause