diff --git a/README.md b/README.md index 7611712..6cbceff 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in With Digiwords, you can create interactive wordclouds. -**Shipped version:** 0.3.0~ynh2 +**Shipped version:** 0.3.2~ynh1 **Demo:** https://ladigitale.dev/digiwords/#/ diff --git a/README_fr.md b/README_fr.md index e419da6..a666ee6 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Digiwords permet de créer des nuages de mots interactifs.) -**Version incluse :** 0.3.0~ynh2 +**Version incluse :** 0.3.2~ynh1 **Démo :** https://ladigitale.dev/digiwords/#/ diff --git a/check_process b/check_process index 1d54057..ed484e1 100644 --- a/check_process +++ b/check_process @@ -20,7 +20,7 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=9c768105e749fb961d6e15f1e020e44cc35fe81c +# upgrade=1 from_commit=9c768105e749fb961d6e15f1e020e44cc35fe81c backup_restore=1 multi_instance=1 port_already_use=0 @@ -28,7 +28,7 @@ ;;; Options Email= Notification=none -;;; Upgrade options - ; commit=9c768105e749fb961d6e15f1e020e44cc35fe81c - name=Fix of the scripts 20220221. - manifest_arg=domain=DOMAIN&path=PATH&language=fr&is_public=1& +#;;; Upgrade options +# ; commit=9c768105e749fb961d6e15f1e020e44cc35fe81c +# ;name=Fix of the scripts 20220221. +# ;manifest_arg=domain=DOMAIN&path=PATH&language=fr&is_public=1& diff --git a/conf/app.src b/conf/app.src index db6d65c..eccfb59 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://kdrive.ladigitale.dev/app/share/139248/9f347a6f-4731-485a-9c9b-b653b250663e/7641/download -SOURCE_SUM=d337d63fdc1a151732e1bb8159615e71 -SOURCE_SUM_PRG=md5sum +SOURCE_URL=https://github.com/YunoHost-Apps/digiwords_ynh/files/8153168/digiwords-v0.3.2.zip +SOURCE_SUM=2e97f6fcb29272c79a12b30c216177c6371efec053a401e4915db7ec46e557dc +SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true #SOURCE_FILENAME= diff --git a/manifest.json b/manifest.json index 79513c8..fd2ebd6 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "With Digiwords, you can create interactive wordclouds.", "fr": "Digiwords permet de créer des nuages de mots interactifs.)" }, - "version": "0.3.0~ynh2", + "version": "0.3.2~ynh1", "url": "https://ladigitale.dev/", "upstream": { "license": "GPL-3.0-only", diff --git a/scripts/upgrade b/scripts/upgrade index bc2f4a6..90943dc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -110,23 +110,30 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --time --weight=1 - # Create a temporary directory - tmpdir="$(mktemp -d)" + # Test because file doesn’t exist at first install. It is created at first page opening. + if test -f "$final_path/inc/digiwords.db" + then + # Create a temporary directory + tmpdir="$(mktemp -d)" - # Backup the inc/digiwords.db file to the temp dir - cp -ar "$final_path/inc/digiwords.db" "$tmpdir/digiwords.db" + # Backup the inc/digiwords.db file to the temp dir + cp -ar "$final_path/inc/digiwords.db" "$tmpdir/digiwords.db" - # Remove the app directory securely - ynh_secure_remove --file=$final_path + # Remove the app directory securely + ynh_secure_remove --file=$final_path + + # Download, check integrity, uncompress and patch the source from app.src + ynh_setup_source --dest_dir="$final_path" + + # Copy digiwords.db back to the final_path + cp -ar "$tmpdir/digiwords.db" "$final_path/inc/digiwords.db" - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" - - # Copy digiwords.db back to the final_path - cp -ar "$tmpdir/digiwords.db" "$final_path/inc/digiwords.db" - - # Remove the tmp directory securely - ynh_secure_remove --file="$tmpdir" + # Remove the tmp directory securely + ynh_secure_remove --file="$tmpdir" + else + # Download, check integrity, uncompress and patch the source from app.src + ynh_setup_source --dest_dir="$final_path" + fi fi # FIXME: this should be managed by the core in the future