diff --git a/scripts/upgrade b/scripts/upgrade index f6fa371..b3b193d 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -53,8 +53,13 @@ ynh_systemctl --service="$app" --action="stop" #================================================= ynh_script_progression "Upgrading source files..." +### ynh_setup_source can wipe the destination dir if called with --full_replace. +### On upgrade, that is certainly what you want, to remove any old source file that +### does not exist in the new version of the software. +### You can list with --keep every file/directory to *not* wipe or overwrite, +### useful for configuration files, data directories, or plugins. # Download, check integrity, uncompress and patch the source from manifest.toml -ynh_setup_source --dest_dir="$install_dir" +ynh_setup_source --dest_dir="$install_dir" --full_replace --keep=".env data" ### $install_dir will automatically be initialized with some decent ### permissions by default ... however, you may need to recursively reapply