Skip to content
Snippets Groups Projects
Commit 4478a538 authored by Eric Zillmann's avatar Eric Zillmann
Browse files

#1 make the check for changes use the correct branch

parent 495d30d4
No related branches found
No related tags found
1 merge request!3#1 make the check for changes use the correct branch
......@@ -11,10 +11,12 @@ date
{% set path=[webRoot, drupal.src.git.target2|default(drupal.src.git.target)]|join('') %}
cd {{ path }}
branch="$(git rev-parse --abbrev-ref HEAD)"
if [ $force -eq 0 ]; then
echo '> check for changes'
OUTPUT=$(git remote show origin)
if [[ $OUTPUT == *"master pushes to master (up to date)"* ]]; then
if [[ $OUTPUT == *"pushes to $branch (up to date)"* ]]; then
echo "> unchanged, cancel"
exit
fi
......@@ -39,7 +41,6 @@ if [ -f 'ansible.sh' ]; then
./ansible.sh
fi
branch="$(git rev-parse --abbrev-ref HEAD)"
echo "> git pull $branch"
git pull origin "$branch"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment