summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2015-04-15 20:39:41 +0000
committervarac <varacanero@zeromail.org>2015-04-15 20:39:41 +0000
commitca95bcfc1adac8fdddfc5c766836c1391d18a7dc (patch)
treeff7c636d9ec288407489d45b9b6f200c89458e8e
parentd80a8369c690069a16de2bcb8c9c370cb26d4d35 (diff)
update_platform() is now able to updated even if branch was forcefully pushed, i.e. rebased
-rwxr-xr-xleap-platform-test15
1 files changed, 14 insertions, 1 deletions
diff --git a/leap-platform-test b/leap-platform-test
index a48eff4..bdeddc7 100755
--- a/leap-platform-test
+++ b/leap-platform-test
@@ -427,7 +427,20 @@ update_leap_cli () {
update_platform () {
cd "$PLATFORMDIR"
- git pull
+ # works also with forces updates, i.e. reabased branches like citest
+ # http://stackoverflow.com/questions/4550937/how-to-force-update-when-doing-git-pull/14359894#14359894
+
+ # throw away local uncommitted changes
+ git reset --hard HEAD
+ # remove untracked files
+ git clean -f
+
+ git fetch
+ git checkout origin/$PLATFORM_BRANCH
+ git checkout -B $PLATFORM_BRANCH
+
+ git submodule sync
+ git submodule update --init
}
versions () {