Skip to content
Snippets Groups Projects
Commit 184b4579 authored by jurgenhaas's avatar jurgenhaas
Browse files

Merge branch 'master' into 'master'

#1 make the check for changes use the correct branch

See merge request ansible-roles/drupal!3
parents 90dc829f 4478a538
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 ...@@ -11,10 +11,12 @@ date
{% set path=[webRoot, drupal.src.git.target2|default(drupal.src.git.target)]|join('') %} {% set path=[webRoot, drupal.src.git.target2|default(drupal.src.git.target)]|join('') %}
cd {{ path }} cd {{ path }}
branch="$(git rev-parse --abbrev-ref HEAD)"
if [ $force -eq 0 ]; then if [ $force -eq 0 ]; then
echo '> check for changes' echo '> check for changes'
OUTPUT=$(git remote show origin) 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" echo "> unchanged, cancel"
exit exit
fi fi
...@@ -39,7 +41,6 @@ if [ -f 'ansible.sh' ]; then ...@@ -39,7 +41,6 @@ if [ -f 'ansible.sh' ]; then
./ansible.sh ./ansible.sh
fi fi
branch="$(git rev-parse --abbrev-ref HEAD)"
echo "> git pull $branch" echo "> git pull $branch"
git pull origin "$branch" git pull origin "$branch"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment