You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@griffin.apache.org by gu...@apache.org on 2018/09/13 01:56:40 UTC

incubator-griffin-site git commit: clean cache before deploy

Repository: incubator-griffin-site
Updated Branches:
  refs/heads/master 85cd24c8b -> ff57184c0


clean cache before deploy


Project: http://git-wip-us.apache.org/repos/asf/incubator-griffin-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-griffin-site/commit/ff57184c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-griffin-site/tree/ff57184c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-griffin-site/diff/ff57184c

Branch: refs/heads/master
Commit: ff57184c0b342dd3f9be17f5824672f93c71df6e
Parents: 85cd24c
Author: William Guo <gu...@apache.org>
Authored: Thu Sep 13 09:56:26 2018 +0800
Committer: William Guo <gu...@apache.org>
Committed: Thu Sep 13 09:56:26 2018 +0800

----------------------------------------------------------------------
 deploy.sh | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-griffin-site/blob/ff57184c/deploy.sh
----------------------------------------------------------------------
diff --git a/deploy.sh b/deploy.sh
index 6e10713..1fc9bad 100644
--- a/deploy.sh
+++ b/deploy.sh
@@ -24,15 +24,12 @@ else
   exit 1
 fi
 
-# Switch to the SITE branch
-git checkout $SITE > /dev/null 2>&1
-if [ $? = 1 ]; then
-  # Branch does not exist. Create an orphan branch.
-  git checkout -b $SITE > /dev/null 2>&1
-  git add --all .
-  git commit -m "Initial commit" > /dev/null 2>&1
-  echo "$SITE branch does not exist, created new"
-fi
+# Delete local $SITE branch and recreate it.
+git branch -D $SITE > /dev/null 2>&1
+git checkout -b $SITE > /dev/null 2>&1
+git add --all .
+git commit -m "Initial commit" > /dev/null 2>&1
+echo "delete $SITE branch , and recreate empty one"
 
 # Remove the current contents of the SITE branch and
 #   replace them with the contents of the temp folder