Skip to content

Commit

Permalink
Moved webhost trigger into project-specific hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
shogsbro committed Mar 1, 2012
1 parent ce40736 commit 4b647d9
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions website-pull
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@ shift
repo=$1
shift
branches=$@
updater=~/$repo

for branch in $branches
do
echo "$me: updating $branch branch of $repo..."
cd ~/$repo/$branch
git fetch -q
git checkout -qf $branch
git merge -q origin/$branch

# Touch flag file to trigger UWSGI reload
touch ~/$repo/reload-$branch
done
# If an executable file exist at ~/<repo>, run it for each branch with the branch as the argument
if [ -x $updater ]; then
for branch in $branches
do
echo "$me: executing $updater for branch $branch"
$updater $branch || true
done
fi

exit 0

0 comments on commit 4b647d9

Please sign in to comment.