mirror of
https://github.com/YunoHost-Apps/dont-code_ynh.git
synced 2024-09-03 18:26:34 +02:00
Merge pull request #35 from YunoHost-Apps/dev
Fixed doc dir issue when upgrading
This commit is contained in:
commit
96fa065201
5 changed files with 13 additions and 3 deletions
|
@ -32,7 +32,7 @@ This Yunohost app installs the server part (services + mongo database) needed to
|
|||
- As well any documents or images uploaded by users will be backed up
|
||||
|
||||
|
||||
**Shipped version:** 0.2.10~ynh5
|
||||
**Shipped version:** 0.2.10~ynh6
|
||||
|
||||
**Demo:** https://dont-code.net/apps.html
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ This Yunohost app installs the server part (services + mongo database) needed to
|
|||
- As well any documents or images uploaded by users will be backed up
|
||||
|
||||
|
||||
**Version incluse :** 0.2.10~ynh5
|
||||
**Version incluse :** 0.2.10~ynh6
|
||||
|
||||
**Démo :** https://dont-code.net/apps.html
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ name = "Dont-code Services"
|
|||
description.en = "Install services and databases needed to support Dont-code platform"
|
||||
description.fr = "Installe les services et base de données nécessaires pour utiliser la plateforme Dont-code"
|
||||
|
||||
version = "0.2.10~ynh5"
|
||||
version = "0.2.10~ynh6"
|
||||
|
||||
maintainers = ["Dont-code Team"]
|
||||
|
||||
|
|
|
@ -42,6 +42,13 @@ if [[ -n "${document_path:-}" ]]; then
|
|||
fi
|
||||
|
||||
if [[ -n "${html_path:-}" ]]; then
|
||||
|
||||
# document dir has moved from html_path to data_dir, so set the variable accordingly
|
||||
if [[ ${document_dir} == ${html_path}* ]]; then
|
||||
document_dir=$data_dir/docs
|
||||
ynh_app_setting_set --app="$app" --key=document_dir --value="$document_dir"
|
||||
fi
|
||||
|
||||
# Migrate html_path to data_dir
|
||||
mv "$html_path/index.html" "$html_path/docs" "$data_dir"
|
||||
old_doc_dir="$html_path/docs"
|
||||
|
@ -56,6 +63,7 @@ if [[ -n "${html_path:-}" ]]; then
|
|||
ynh_backup_if_checksum_is_different --file="$install_dir/.env"
|
||||
ynh_replace_string --match_string="$old_doc_dir" --replace_string="$document_dir" --target_file="$install_dir/.env"
|
||||
ynh_store_file_checksum --file="$install_dir/.env"
|
||||
|
||||
fi
|
||||
|
||||
# Regenerate the .env file if the document_url was incorrectly set before
|
||||
|
|
|
@ -10,3 +10,5 @@ test_format = 1.0
|
|||
# -------------------------------
|
||||
|
||||
test_upgrade_from.7852cc4bf44ff20ee51fe35f3f53dc105e0f6d79.name= "2023-01-07 - Added Ssh support for dev."
|
||||
test_upgrade_from.e89eebdac9f59202202d07972e274ebe6fc7c51c.name= "Before Manifest v2."
|
||||
|
Loading…
Reference in a new issue