1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/invidious_ynh.git synced 2024-09-03 19:15:55 +02:00

Update upgrade

This commit is contained in:
ericgaspar 2020-11-10 16:43:49 +01:00
parent f35d7aa659
commit 26d42b0673
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -74,16 +74,13 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_script_progression --message="Upgrading source files..." --weight=5 ynh_script_progression --message="Upgrading source files..." --weight=5
# Remove the app directory securely
pushd "$final_path" || ynh_die ynh_secure_remove --file=$final_path
ynh_exec_as $app
currentVersion=$(git rev-list --max-count=1 --abbrev-commit HEAD) pushd "$final_path" || ynh_die
git pull shards update && shards install
for i in `git rev-list --reverse --abbrev-commit $currentVersion..HEAD` ; do file=./config/migrate-scripts/migrate-db-$i.sh ; [ -f $file ] && $file ; done crystal build $final_path/src/invidious.cr --release
shards update && shards install popd || ynh_die
crystal build src/invidious.cr #--release
exit
popd || ynh_die
fi fi
#================================================= #=================================================