i have written for my own a little updater script for gogs. It works, if you have a 64 bit linux machine. You schould have installed curl and a user called git, who executete the gogs server. You schould have setup gogs as systemd service for automatic stop and restart.I am open for ideas or improvements, that was only the first draw i made. Testet on Ubuntu 16.04.
echo "Stoping Gogs" systemctl stop gogs echo "Delete the old backup" rm -rf gogs_old rm -rf latest.zip echo "Creating new backup" mv gogs gogs_old echo "Download latest version" curl -s -L https://github.com/gogits/gogs/releases/latest | egrep -o '/gogits/gogs/releases/download/[v][0-9\.]*\/linux_amd64.zip' | wget --base=http://github.com/ -i - -O latest.zip echo "Unzip Update" unzip latest.zip echo "Copy Config from Backup to Update" cp -R gogs_old/custom gogs cp -R gogs_old/data gogs cp -R gogs_old/log gogs echo "Fix Permission" chown -R git:git /home/git echo "Start Gogs" systemctl start gogs