Do not check code is updated when not needed

Particularly, when it is master or a detached HEAD (usually when
checking out tags).
This commit is contained in:
Rafa de la Torre 2016-08-11 19:20:02 +02:00
parent 9ada8d12ca
commit 47f1f918d4

View File

@ -1,5 +1,13 @@
#!/bin/bash
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ "$CURRENT_BRANCH" == "master" || "$CURRENT_BRANCH" == "HEAD" ]]
then
echo "master branch or detached HEAD"
exit 0
fi
# Add remote-master
git remote add -t master remote-master https://github.com/CartoDB/crankshaft.git