1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mobilizon_ynh.git synced 2024-09-03 19:46:19 +02:00

Merge pull request #24 from YunoHost-Apps/testing

Testing
This commit is contained in:
yalh76 2019-06-23 01:11:37 +02:00 committed by GitHub
commit cc4ac34cdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 32 additions and 27 deletions

View file

@ -13,7 +13,7 @@ MobiliZon aims to solve existing platform's problems to organize events in a dec
Mobilizon is a tool designed to create platforms for managing communities and events. Its purpose is to help as many people as possible to free themselves from Facebook groups and events, from Meetup, etc. Mobilizon is a tool designed to create platforms for managing communities and events. Its purpose is to help as many people as possible to free themselves from Facebook groups and events, from Meetup, etc.
**Shipped version:** 0.1.0-2019-05-15 **Shipped version:** 0.1.0-2019-06-14
## Important ## Important

View file

@ -15,24 +15,16 @@
setup_private=1 setup_private=1
setup_public=1 setup_public=1
upgrade=1 upgrade=1
upgrade=1 from_commit=185cc16e516076e340cca149e8e9140a8762e22e
backup_restore=1 backup_restore=1
multi_instance=1 multi_instance=1
incorrect_path=0 # This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version.
# incorrect_path=1
port_already_use=0 port_already_use=0
change_url=0 change_url=0
;;; Levels ;;; Levels
Level 1=auto # If the level 5 (Package linter) is forced to 1. Please add justifications here.
Level 2=auto
Level 3=auto
# Level 4: If the app supports LDAP and SSOwat, turn level 4 to '1' and add a link to an issue or a part of your code to show it.
# If the app does not use LDAP nor SSOwat, and can't use them, turn level 4 to 'na' and explain as well.
Level 4=0
Level 5=auto Level 5=auto
Level 6=auto
Level 7=auto
Level 8=0
Level 9=0
Level 10=0
;;; Options ;;; Options
Email=yalh@yahoo.com Email=yalh@yahoo.com
Notification=all Notification=all

View file

@ -1,6 +1,6 @@
SOURCE_URL=https://framagit.org/framasoft/mobilizon/-/archive/c53f19dc04cdbdfc23f654daa489be28e18ff7f1/mobilizon-c53f19dc04cdbdfc23f654daa489be28e18ff7f1.tar.gz SOURCE_URL=https://framagit.org/framasoft/mobilizon/-/archive/1f0d125d6f488cca1a4dd9ba59efe1584dc9eb02/mobilizon-1f0d125d6f488cca1a4dd9ba59efe1584dc9eb02.tar.gz
SOURCE_SUM=27e8f0a5fecd71e7531cec794870cefb23a8692fe2ed9463c272fbb05481292f SOURCE_SUM=66ed172914e365b0a422cd6bdfd2d8803900bfd320ac2717039a44bc7a660fd0
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true
SOURCE_FILENAME= SOURCE_FILENAME=

View file

@ -6,7 +6,7 @@
"en": "Your federated organization and mobilization platform.", "en": "Your federated organization and mobilization platform.",
"fr": "Votre plateforme fédérée d'organisation et de mobilisation." "fr": "Votre plateforme fédérée d'organisation et de mobilisation."
}, },
"version": "0.1.0-2019-05-15~ynh1", "version": "0.1.0-2019-06-14~ynh1",
"url": "https://joinmobilizon.org/", "url": "https://joinmobilizon.org/",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"maintainer": { "maintainer": {

View file

@ -11,13 +11,8 @@
- [ ] Upgrade from last version tested. - [ ] Upgrade from last version tested.
- [ ] Can be reviewed and tested. - [ ] Can be reviewed and tested.
## Validation ## Package_check results
--- ---
- [ ] **Code review** *If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results*
- [ ] **Approval (LGTM)**
*Code review and approval have to be from a member of @YunoHost/apps group* [![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/mobilizon_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/mobilizon_ynh%20PR-NUM-%20(USERNAME)/)
- **CI succeeded** :
[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/mobilizon_ynh%20-BRANCH-/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/mobilizon_ynh%20-BRANCH-/)
*Please replace '-BRANCH-' in this link by the name of the branch used.*
*If the PR is from a forked repository. Please provide public results from package_check.*
When the PR is marked as ready to merge, you have to wait for 3 days before really merging it.

View file

@ -71,6 +71,7 @@ ynh_print_info --message="Backing up the app before upgrading (may take a while)
# Backup the current version of the app # Backup the current version of the app
ynh_backup_before_upgrade ynh_backup_before_upgrade
ynh_clean_setup () { ynh_clean_setup () {
read -p "key"
# restore it if the upgrade fails # restore it if the upgrade fails
ynh_restore_upgradebackup ynh_restore_upgradebackup
ynh_clean_check_starting ynh_clean_check_starting
@ -94,9 +95,26 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd
if [ "$upgrade_type" == "UPGRADE_APP" ] if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_script_progression --message="Upgrading source files..." --time --weight=1 ynh_script_progression --message="Upgrading source files..." --time --weight=1
# Create a temporary directory
tmpdir="$(mktemp -d)"
# Backup the config file in the temp dir
cp -a "$final_path/$app/.env" "$tmpdir/.env"
cp -a "$final_path/$app/config/prod.exs" "$tmpdir/prod.exs"
# Remove the app directory securely
ynh_secure_remove --file="$final_path/$app"
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path/$app" ynh_setup_source --dest_dir="$final_path/$app"
#Copy the admin saved settings from tmp directory to final path
cp -a "$tmpdir/.env" "$final_path/$app/.env"
cp -a "$tmpdir/prod.exs" "$final_path/$app/config/prod.exs"
# Remove the tmp directory securely
ynh_secure_remove --file="$tmpdir"
fi fi
#================================================= #=================================================
@ -134,6 +152,7 @@ ynh_system_user_create --username=$app --home_dir=$final_path
#================================================= #=================================================
config="$final_path/$app/.env" config="$final_path/$app/.env"
ynh_backup_if_checksum_is_different --file="$config"
cp ../conf/.env "$config" cp ../conf/.env "$config"
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$config" ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$config"
@ -183,7 +202,6 @@ popd
# STORE THE CONFIG FILE CHECKSUM # STORE THE CONFIG FILE CHECKSUM
#================================================= #=================================================
ynh_backup_if_checksum_is_different --file="$config"
# Recalculate and store the checksum of the file for the next upgrade. # Recalculate and store the checksum of the file for the next upgrade.
ynh_store_file_checksum --file="$config" ynh_store_file_checksum --file="$config"