mirror of
https://github.com/YunoHost-Apps/streams_ynh.git
synced 2024-09-03 20:26:20 +02:00
Upgrade script corrections
This commit is contained in:
parent
0883335b9e
commit
6084440305
1 changed files with 30 additions and 35 deletions
|
@ -55,47 +55,30 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||
|
||||
git_dir="$install_dir/.git"
|
||||
if [ ! -d "$git_dir" ]
|
||||
then
|
||||
# First we save what we need to keep
|
||||
mv $install_dir/store $data_dir/
|
||||
mv $install_dir/cache $data_dir/
|
||||
mv $install_dir/php.log $data_dir/
|
||||
|
||||
# First we save what we need to keep
|
||||
mv $install_dir/store $data_dir/
|
||||
mv $install_dir/cache $data_dir/
|
||||
mv $install_dir/php.log $data_dir/
|
||||
# Then we remove the previous install
|
||||
ynh_secure_remove $install_dir
|
||||
|
||||
# Then we remove the previous install
|
||||
ynh_secure_remove $install_dir
|
||||
# We make the install cloning the repo
|
||||
mkdir -p "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
# We make the install cloning the repo
|
||||
mkdir -p "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
git config --system --add safe.directory $install_dir
|
||||
|
||||
git config --system --add safe.directory $install_dir
|
||||
git clone https://codeberg.org/streams/streams.git "$install_dir" --quiet
|
||||
|
||||
git clone https://codeberg.org/streams/streams.git "$install_dir" --quiet
|
||||
# We restore what we previously saved
|
||||
mv $data_dir/store $install_dir/
|
||||
mv $data_dir/cache $install_dir/
|
||||
mv $data_dir/php.log $install_dir/
|
||||
|
||||
# We restore what we previously saved
|
||||
mv $data_dir/store $install_dir/
|
||||
mv $data_dir/cache $install_dir/
|
||||
mv $data_dir/php.log $install_dir/
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
chmod -R 775 $install_dir/store $install_dir/cache
|
||||
|
||||
#=================================================
|
||||
# ADDONS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing addons..."
|
||||
|
||||
pushd $install_dir
|
||||
ynh_exec_as $app git config pull.rebase false
|
||||
ynh_exec_as $app util/add_addon_repo https://codeberg.org/streams/streams-addons.git zaddons
|
||||
cd /var/www/$app/extend/addon/zaddons
|
||||
ynh_exec_as $app git config pull.rebase false
|
||||
popd
|
||||
fi
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
chmod -R 775 $install_dir/store $install_dir/cache
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
@ -116,6 +99,18 @@ ynh_script_progression --message="Pulling in external libraries with Composer...
|
|||
|
||||
ynh_install_composer
|
||||
|
||||
#=================================================
|
||||
# ADDONS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing addons..."
|
||||
|
||||
pushd $install_dir
|
||||
ynh_exec_as $app git config pull.rebase false
|
||||
ynh_exec_as $app util/add_addon_repo https://codeberg.org/streams/streams-addons.git zaddons
|
||||
cd /var/www/$app/extend/addon/zaddons
|
||||
ynh_exec_as $app git config pull.rebase false
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue