Added version variable. Defaults to Prod releases

This commit is contained in:
Poag 2016-08-12 11:48:33 +01:00 committed by GitHub
parent 7123e4a673
commit 616bcfcf5d

View File

@ -3,12 +3,17 @@
#Cleanup Old
rm -rf /root/NadekoBot
#Get NadekoBot Latest
curl -s https://api.github.com/repos/Kwoth/NadekoBot/releases | grep browser_download_url | head -n 1 | cut -d '"' -f 4|wget -i - -O /root/NadekoBot.latest.zip &&\
#Get NadekoBot Version
if [[ "$VERSION" = dev]]; then
curl -s https://api.github.com/repos/Kwoth/NadekoBot/releases | grep browser_download_url | head -n 1 | cut -d '"' -f 4|wget -i - -O /root/NadekoBot.latest.zip &&\
else
curl -s https://api.github.com/repos/Kwoth/NadekoBot/releases/latest | grep browser_download_url | head -n 1 | cut -d '"' -f 4|wget -i - -O /root/NadekoBot.latest.zip &&\
fi
unzip /root/NadekoBot.latest.zip -d /root/NadekoBot
#Sync any new data files
rsync --ignore-existing -r /root/NadekoBot/data /config
#Remove data folder
rm -rf /root/NadekoBot/data
rm -rf /root/NadekoBot/data