diff --git a/conf/daily-update.sh b/conf/daily-update.sh index d3953cd..ecb894f 100644 --- a/conf/daily-update.sh +++ b/conf/daily-update.sh @@ -3,7 +3,14 @@ echo " " echo "+++ $(date) +++" echo " " -echo "$(date) - Updating website..." -(cd /var/www/__APP__ ; sudo -u __APP__ util/udall) -echo "$(date) - Daily update finished." +git_branch="$(cd /var/www/__APP__ && sudo -u __APP__ \ + git branch --show-current)" 2> /dev/null +if echo $git_branch | grep -q "release" +then + echo "$(date) - Updating website..." + (cd /var/www/__APP__ ; sudo -u __APP__ util/udall) + echo "$(date) - Daily update finished." +else + echo "$(date) - release branch not in use, no automatic update" +fi