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

Bump version and fix envdir calls

This commit is contained in:
Jules Bertholet 2021-03-30 00:34:10 -04:00
parent eff624b855
commit 454280f513
4 changed files with 9 additions and 11 deletions

View file

@ -9,9 +9,8 @@ purge=$2
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
env_path=$final_path/envs/prod
pushd $final_path
source $final_path/venv/bin/activate
sudo -u $app $final_path/venv/bin/envdir $env_path python3 $final_path/manage.py shell <<< "
pushd $final_path || ynh_die
sudo -u $app $final_path/venv/bin/envdir $env_path $final_path/venv/bin/python $final_path/manage.py shell <<< "
from django.contrib.auth import get_user_model
User = get_user_model()
try:
@ -23,4 +22,4 @@ try:
except User.DoesNotExist:
pass
"
popd
popd || ynh_die

View file

@ -6,7 +6,7 @@
"en": "Manage podcast subscriptions, and sync them between apps and devices",
"fr": "Gérez vos sousciptions balado, et sychronisez-lez entre vos applis et appareils"
},
"version": "2.11.1~ynh2",
"version": "2.11.1~ynh3",
"url": "https://github.com/gpodder/mygpo",
"license": "AGPL-3.0-only",
"maintainer": {

View file

@ -119,7 +119,6 @@ chown -R $app:$app $datadir
chmod o-rwx $datadir
setfacl -n -R -m user:www-data:rx -m default:user:www-data:rx $datadir
ynh_app_setting_set --app=$app --key=datadir --value="$datadir"
#=================================================
@ -164,9 +163,9 @@ popd || ynh_die
#=================================================
pushd $final_path || ynh_die
chown -R root:$app $final_path
sudo -u $app $final_path/venv/bin/envdir $env_path python3 $final_path/manage.py makemigrations
sudo -u $app $final_path/venv/bin/envdir $env_path python3 $final_path/manage.py migrate
sudo -u $app $final_path/venv/bin/envdir $env_path python3 $final_path/manage.py createsuperuser --username "$admin" --email "$admin_email" --noinput -v 0
sudo -u $app $final_path/venv/bin/envdir $env_path $final_path/venv/bin/python $final_path/manage.py makemigrations
sudo -u $app $final_path/venv/bin/envdir $env_path $final_path/venv/bin/python $final_path/manage.py migrate
sudo -u $app $final_path/venv/bin/envdir $env_path $final_path/venv/bin/python $final_path/manage.py createsuperuser --username "$admin" --email "$admin_email" --noinput -v 0
chown -R root:root $final_path
popd || ynh_die

View file

@ -114,8 +114,8 @@ ynh_script_progression --message="Performing database migrations..." --weight=2
pushd $final_path || ynh_die
chown -R root:$app $final_path
sudo -u $app $final_path/venv/bin/envdir $env_path python3 $final_path/manage.py makemigrations
sudo -u $app $final_path/venv/bin/envdir $env_path python3 $final_path/manage.py migrate
sudo -u $app $final_path/venv/bin/envdir $env_path $final_path/venv/bin/python $final_path/manage.py makemigrations
sudo -u $app $final_path/venv/bin/envdir $env_path $final_path/venv/bin/python $final_path/manage.py migrate
chown -R root:root $final_path
popd || ynh_die