diff --git a/datafiles/install.sh b/datafiles/install.sh index 574c0446..0b03e5dc 100644 --- a/datafiles/install.sh +++ b/datafiles/install.sh @@ -15,8 +15,11 @@ if [[ -z $CONTAINER_CONFIGS_DIR ]]; then fi echo "Checkouting to container configs branch $CONTAINER_CONFIGS_STREAM ..." git checkout $CONTAINER_CONFIGS_STREAM - echo "Pulling recent changes from $CONTAINER_CONFIGS_STREAM ..." - git pull + is_branch="$(git show-ref --verify refs/heads/$CONTAINER_CONFIGS_STREAM >/dev/null 2>&1; echo $?)" + if [[ $is_branch -eq 0 ]] ; then + echo "Pulling recent changes from $CONTAINER_CONFIGS_STREAM ..." + git pull + fi else echo "Syncing container configs ..." rsync -r $CONTAINER_CONFIGS_DIR/* $CONFIG_DIR diff --git a/datafiles/update.sh b/datafiles/update.sh index 079f5b3b..ae19181b 100644 --- a/datafiles/update.sh +++ b/datafiles/update.sh @@ -25,8 +25,11 @@ if [[ -z $CONTAINER_CONFIGS_DIR ]]; then git fetch echo "Checkouting to container configs branch $CONTAINER_CONFIGS_STREAM ..." git checkout $CONTAINER_CONFIGS_STREAM - echo "Pulling changes ..." - git pull + is_branch="$(git show-ref --verify refs/heads/$CONTAINER_CONFIGS_STREAM >/dev/null 2>&1; echo $?)" + if [[ $is_branch -eq 0 ]] ; then + echo "Pulling changes ..." + git pull + fi echo "Pulling new version of images ..." SKALE_DIR=$SKALE_DIR docker-compose -f docker-compose.yml pull else