From 5b83d679d2f41508a81d8a055601605b001d1da4 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Mon, 12 Mar 2018 20:02:24 +0100 Subject: [PATCH] Fix upgrade old version --- scripts/upgrade | 6 ++++++ .../app-00-add-logout_url-conf.patch | 0 .../app-01-disable-CSPv3-nonce_and_allow-YNH-fonts.patch | 0 3 files changed, 6 insertions(+) rename sources/{patches => patches_last_version}/app-00-add-logout_url-conf.patch (100%) rename sources/{patches => patches_last_version}/app-01-disable-CSPv3-nonce_and_allow-YNH-fonts.patch (100%) diff --git a/scripts/upgrade b/scripts/upgrade index a156b9f..de16619 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -191,6 +191,12 @@ do # Create a temporary directory tmpdir=$(mktemp -d) + # Patch nexcloud files only for the last upgrade. + if [ "$current_major_version" = "last" ] + then + cp -a ../sources/patches_last_version ../sources/patches + fi + # Install the next nextcloud version in $tmpdir ynh_setup_source "$tmpdir" diff --git a/sources/patches/app-00-add-logout_url-conf.patch b/sources/patches_last_version/app-00-add-logout_url-conf.patch similarity index 100% rename from sources/patches/app-00-add-logout_url-conf.patch rename to sources/patches_last_version/app-00-add-logout_url-conf.patch diff --git a/sources/patches/app-01-disable-CSPv3-nonce_and_allow-YNH-fonts.patch b/sources/patches_last_version/app-01-disable-CSPv3-nonce_and_allow-YNH-fonts.patch similarity index 100% rename from sources/patches/app-01-disable-CSPv3-nonce_and_allow-YNH-fonts.patch rename to sources/patches_last_version/app-01-disable-CSPv3-nonce_and_allow-YNH-fonts.patch