Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions scripts/circleci.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@

if [ ! -d $MONSTER_ROOT ]; then
echo Cloning kazoo into $MONSTER_ROOT
git clone https://github.com/2600hz/monster-ui $MONSTER_ROOT
git clone https://gitlab.com/oomaforbin/oomacorp/2600hz/monster-ui.git $MONSTER_ROOT
fi

if [ -z $BASE_BRANCH ]; then
BASE_BRANCH="origin/master"
fi

if [[ $BASE_BRANCH != "origin/master" ]]; then
CORE_IDENTITY=`curl https://api.github.com/repos/2600hz/monster-ui/git/refs/tags \
| grep "refs" \
| sed 's|[^0-9\.]||g' \
| sort --version-sort \
| grep "^${BASE_BRANCH#origin/}" \
| grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' \
| tail -1`
cd $MONSTER_ROOT
git fetch --tags
CORE_IDENTITY=$(git tag -l \
| sort --version-sort \
| grep "^${BASE_BRANCH#origin/}" \
| grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' \
| tail -1)
cd -
else
CORE_IDENTITY='master'
fi
Expand Down