| Index: deploy/checkout-core.sh |
| diff --git a/deploy/checkout-core.sh b/deploy/checkout-core.sh |
| deleted file mode 100755 |
| index 262df08ee5fd99c435030b2d568dc3918d30b269..0000000000000000000000000000000000000000 |
| --- a/deploy/checkout-core.sh |
| +++ /dev/null |
| @@ -1,59 +0,0 @@ |
| -#!/bin/sh |
| - |
| -CORE_REPONAME=$1 |
| -MAIN_BRANCH=$2 |
| -ORIGIN_URL=git@github.com:${CIRCLE_PROJECT_USERNAME}/${CORE_REPONAME}.git |
| - |
| -pushd ${HOME} |
| - |
| -# Kitt-core checkout folder "../kitt-core" is CACHED (see circle.yml). |
| -# Must cover all 3 possible states of the repo |
| -if [ -d "${CORE_REPONAME}" ]; then |
| -# Cached folder does exist |
| - cd ${CORE_REPONAME} |
| - if [ ! -d ".git" ]; then |
| -# but has lost git knowledge, recreate it |
| - echo "Core folder exists but is not git repo, adding remote" |
| - git init |
| - git remote add origin ${ORIGIN_URL} |
| - fi |
| -# update from git, original or recreated |
| - echo "Fetching core repo origin" |
| - git fetch origin |
| -else |
| -# Cached folder does not exist (was not in cache yet), create new |
| - echo "Core folder does not exist, cloning" |
| - git clone ${ORIGIN_URL} |
| - cd ${CORE_REPONAME} |
| -fi |
| - |
| -# Check out as similar kitt-core branch as the one of main adblock repo |
| -if [ "$MAIN_BRANCH" == "master" ]; then |
| - # master is already checked out by default upon git clone |
| - # (no remote -t) |
| - echo "Checking out local master" |
| - git checkout -f master |
| -else |
| - # does the same branch exist in kitt-core ? |
| - CORE_BRANCH=$(git branch -r | grep "${MAIN_BRANCH}$") |
| - if [ -z "$CORE_BRANCH" ]; then |
| - echo "Main branch '$MAIN_BRANCH' does not exist in '$CORE_REPONAME'" |
| - case "$MAIN_BRANCH" in |
| - release* ) |
| - # fall back to newest release branch |
| - # TECHNICALLY OBSOLETE BECAUSE THERE IS ALWAYS ONLY ONE RELEASE BRANCH |
| - # WITHOUT VERSION NUMBER but kept for potential future changes |
| - CORE_BRANCH=$(git branch -r | grep release | sort -g | tail -1) |
| - echo "Will check out latest '$CORE_BRANCH'" |
| - ;; |
| - *) |
| - # fall back to develop |
| - echo "Will check out develop head" |
| - CORE_BRANCH="origin/develop" |
| - ;; |
| - esac |
| - fi |
| - git checkout -f -t $CORE_BRANCH |
| -fi |
| - |
| -popd |