mirror of
https://github.com/YunoHost-Apps/streams_ynh.git
synced 2024-09-03 20:26:20 +02:00
Only allow cron daily updates if release branch is used
This commit is contained in:
parent
afee1ab28a
commit
b1cca218bb
1 changed files with 10 additions and 3 deletions
|
@ -3,7 +3,14 @@
|
|||
echo " "
|
||||
echo "+++ $(date) +++"
|
||||
echo " "
|
||||
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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue