mirror of
https://github.com/YunoHost-Apps/kimai2_ynh.git
synced 2024-09-03 19:26:26 +02:00
Create tmp folder in upgrade
This commit is contained in:
parent
c218905621
commit
eee78573fb
1 changed files with 13 additions and 1 deletions
|
@ -80,14 +80,26 @@ ynh_install_php7
|
||||||
version=`cd /var/www/$app && bin/console kimai:version --short 2> /dev/null || sed -n 's/^future-release=//p' .github_changelog_generator`
|
version=`cd /var/www/$app && bin/console kimai:version --short 2> /dev/null || sed -n 's/^future-release=//p' .github_changelog_generator`
|
||||||
|
|
||||||
# Uncompress latest sources
|
# Uncompress latest sources
|
||||||
|
# Create a temporary directory
|
||||||
|
tmpdir="$(mktemp -d)"
|
||||||
|
# Backup the config file in the temp dir
|
||||||
|
cp -a "$final_path/.env" "$tmpdir/."
|
||||||
|
cp -a "$final_path/var/data" "$tmpdir/."
|
||||||
|
|
||||||
ynh_setup_source "$final_path"
|
ynh_setup_source "$final_path"
|
||||||
|
|
||||||
# If the version is 0.3, symfony update is required
|
# If the version is 0.3, symfony update is required
|
||||||
if [ "$version" = "0.3" ]
|
if [ "$version" = "0.3" ]
|
||||||
then
|
then
|
||||||
|
ynh_secure_remove "$final_path"
|
||||||
|
ynh_setup_source "$final_path"
|
||||||
init_symfony_update $final_path
|
init_symfony_update $final_path
|
||||||
fi
|
fi
|
||||||
|
ynh_secure_remove "$final_path"
|
||||||
|
ynh_setup_source "$final_path"
|
||||||
|
sudo cp -a "$tmpdir/.env" "$final_path/."
|
||||||
|
sudo cp -af "$tmpdir/data" "$final_path/var/."
|
||||||
|
sudo rm -Rf "$tmpdir"
|
||||||
init_composer $final_path
|
init_composer $final_path
|
||||||
(
|
(
|
||||||
cd $final_path && sudo /usr/bin/php7.2 bin/console cache:clear --env=prod
|
cd $final_path && sudo /usr/bin/php7.2 bin/console cache:clear --env=prod
|
||||||
|
|
Loading…
Add table
Reference in a new issue