summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-11-22 15:58:07 -0500
committergumi <git@gumi.ca>2018-11-22 15:58:07 -0500
commita1fbc952eb45338df09f1040db4f3d2b44beadca (patch)
treeef79faa39f255cd6d03345b8c3842b774b2db11e
parent22c0ceddf51b8307f444cad1695c6d8ae8231759 (diff)
downloadevol-tools-s20181205.tar.gz
evol-tools-s20181205.tar.bz2
evol-tools-s20181205.tar.xz
evol-tools-s20181205.zip
don't stash on serverexit 104s20181205
-rw-r--r--herculeswrapper/include.sh46
1 files changed, 17 insertions, 29 deletions
diff --git a/herculeswrapper/include.sh b/herculeswrapper/include.sh
index 36184c9..19201ab 100644
--- a/herculeswrapper/include.sh
+++ b/herculeswrapper/include.sh
@@ -41,45 +41,33 @@ function server_logic {
done
}
-function stash_save {
- STR=$(git diff --stat --color=always)
- if [[ -n "${STR}" ]]; then
- echo ${1}: git stash save "wrapper pull"
- git stash save "wrapper pull"
- export ${1}_saved="1"
- else
- export ${1}_saved="0"
- fi
-}
-
-function stash_pop {
- var="${1}_saved"
- eval var=\$$var
- if [[ "${var}" == "1" ]]; then
- echo ${1}: git stash pop
- git stash pop
- fi
+function hard_reset {
+ echo ${1}: hard reset
+ git fetch upstream
+ git reset --hard upstream/master
+ git clean -f
+ # the following should be unnecessary, but just in case:
+ git checkout --detach
+ git branch -D master
+ git checkout upstream/master -b master
}
function pull_all {
- stash_save "data"
+ hard_reset "data"
+ cd ../client-data
+ hard_reset "client"
+ cd ../music
+ hard_reset "music"
cd ../server-code
- stash_save "code"
+ hard_reset "code"
cd src/evol
- stash_save "plugin"
+ hard_reset "plugin"
cd ../../../tools
- stash_save "tools"
+ hard_reset "tools"
cd ..
./pull.sh
cd server-data
git_merge
- stash_pop "data"
- cd ../server-code
- stash_pop "code"
- cd src/evol
- stash_pop "plugin"
- cd ../../../tools
- stash_pop "tools"
cd ../
./status.sh
cd server-data