Fix version detection, add user to update script
This commit is contained in:
parent
74ff514a6e
commit
bcc03d7a6a
12
update.sh
12
update.sh
@ -7,13 +7,15 @@ if [[ $SUCCESS != 0 ]]
|
|||||||
then
|
then
|
||||||
CURRENT='v0.0.0'
|
CURRENT='v0.0.0'
|
||||||
fi
|
fi
|
||||||
if [[ $LATEST_RELEASE < $CURRENT ]]
|
if [[ $LATEST_RELEASE == $CURRENT || $LATEST_RELEASE < $CURRENT ]]
|
||||||
then
|
then
|
||||||
echo "New version ${LATEST_RELEASE} is up to date with currently installed ${CURRENT}"
|
echo "New version ${LATEST_RELEASE} is up to date with currently installed ${CURRENT}"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "New version ${LATEST_RELEASE} detected, updating from ${CURRENT}"
|
echo "New version '${LATEST_RELEASE}' detected, updating from '${CURRENT}'"
|
||||||
wget "https://phlaym.net/git/phlaym/photoprism-slideshow/archive/${LATEST_RELEASE}.tar.gz" -O release.tar.gz
|
sudo -u www-data wget "https://phlaym.net/git/phlaym/photoprism-slideshow/archive/${LATEST_RELEASE}.tar.gz" -O release.tar.gz
|
||||||
|
sudo -u www-data tar xvf release.tar.gz --strip-components=1
|
||||||
tar xvf release.tar.gz
|
sudo -u www-data composer install
|
||||||
|
sudo -u www-data rm release.tar.gz
|
||||||
|
echo $LATEST_RELEASE > version.txt
|
Loading…
Reference in New Issue
Block a user