Add gogs to update script

This commit is contained in:
Bob Mottram 2015-03-19 19:57:24 +00:00
parent 7191ec280c
commit af85cac751
1 changed files with 8 additions and 0 deletions

View File

@ -8383,6 +8383,14 @@ function create_upgrade_script {
echo 'git stash drop' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo 'git pull' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
fi
if grep -Fxq "install_gogs" $COMPLETION_FILE; then
echo '' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo 'cd /home/git/go/src/github.com/gogits/gogs' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo 'git stash' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo 'git stash drop' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo 'git pull' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
fi
echo 'exit 0' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
chmod +x /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo 'create_upgrade_script' >> $COMPLETION_FILE