Browse Source

add first version of gin update scripts

julien colomb 4 years ago
parent
commit
50f89830f9
2 changed files with 33 additions and 0 deletions
  1. 19 0
      GIN_sync_UNIX
  2. 14 0
      GIN_sync_windows.bat

+ 19 - 0
GIN_sync_UNIX

@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+#
+# Upload changes from inside repository using GIN CLI
+# Assumes no submodules
+# Assumes gin init was performed or the repository was downloaded via gin get
+
+if (( $# > 0 )); then
+    echo "This script takes no arguments"
+    exit 1
+fi
+
+loc=$(dirname $0)
+projectdir=$(git -C ${loc} rev-parse --show-toplevel)
+
+pushd ${loc} > /dev/null
+gin download
+gin commit .
+gin upload
+popd > /dev/null

+ 14 - 0
GIN_sync_windows.bat

@@ -0,0 +1,14 @@
+:: Upload changes from inside repository using GIN CLI
+:: Assumes no submodules
+
+
+set curdir=%~dp0
+for /f %%i in ('git -C %curdir% rev-parse --show-toplevel') do set projectdir=%%i
+
+cd %projectdir%
+gin download
+
+gin commit .
+gin upload
+
+pause