1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/halcyon_ynh.git synced 2024-09-03 20:36:21 +02:00
This commit is contained in:
ericgaspar 2021-06-26 18:48:13 +02:00
parent a7fefa52fe
commit f464e6b32c
10 changed files with 35 additions and 36 deletions

View file

@ -1,4 +1,3 @@
---
name: Bug report
about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently.
@ -9,7 +8,7 @@ about: When creating a bug report, please use the following template to provide
1. *Read this whole template first.*
2. *Determine if you are on the right place:*
- *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!*
- *Otherwise, the issue may be due to Halcyon itself. Refer to its documentation or repository for help.*
- *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.*
- *When in doubt, post here and we will figure it out together.*
3. *Delete the italic comments as you write over them below, and remove this guide.*
---
@ -32,7 +31,7 @@ about: When creating a bug report, please use the following template to provide
- *If you performed a command from the CLI, the command itself is enough. For example:*
```sh
sudo yunohost app install Halcyon
sudo yunohost app install the_app
```
- *If you used the webadmin, please perform the equivalent command from the CLI first.*
- *If the error occurs in your browser, explain what you did:*

16
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,16 @@
## Problem
- *Description of why you made this PR*
## Solution
- *And how do you fix that problem*
## PR Status
- [ ] Code finished and ready to be reviewed/tested
- [ ] The fix/enhancement were manually tested (if applicable)
## Automatic tests
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)

View file

@ -1,6 +1,7 @@
;; Test complet
; Manifest
domain="domain.tld"
path="/path"
is_public=1
language="en_US"
; Checks

BIN
doc/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 KiB

View file

@ -8,6 +8,11 @@
},
"version": "2.4.9~ynh1",
"url": "https://notabug.org/halcyon-suite/halcyon",
"upstream": {
"license": "AGPL-3.0-only",
"website": "https://notabug.org/halcyon-suite/halcyon",
"code": "https://notabug.org/halcyon-suite/halcyon"
},
"license": "AGPL-3.0-only",
"maintainer": {
"name": "Anmol Sharma",

View file

@ -1,18 +0,0 @@
## Problem
- *Description of why you made this PR*
## Solution
- *And how do you fix that problem*
## PR Status
- [ ] Code finished.
- [ ] Tested with Package_check.
- [ ] Fix or enhancement tested.
- [ ] Upgrade from last version tested.
- [ ] Can be reviewed and tested.
## Package_check results
---
*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*
[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/halcyon_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/halcyon_ynh%20PR-NUM-%20(USERNAME)/)

View file

@ -84,9 +84,9 @@ fi
### (It's compatible with sed regular expressions syntax)
ynh_replace_string "$old_domain" "$new_domain" "$final_path/config/config.ini"
# Set permissions to app files
chown -R $app: $final_path
chmod -R 755 $final_path/data
# # Set permissions to app files
# chown -R $app $final_path
# chmod -R 755 $final_path/data
### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script.
### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it.

View file

@ -45,7 +45,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=1
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
ynh_app_setting_set --app=$app --key=language --value=$language
#=================================================
@ -97,7 +96,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
ynh_add_config --template="../conf/config.ini.sample" --destination="$final_path/config/config.ini"
chmod 400 "$final_path/config/config.ini"
chown $app:$app "$final_path/config/config.ini"
chown $app "$final_path/config/config.ini"
#=================================================
# SETUP SSOWAT

View file

@ -18,7 +18,6 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
language=$(ynh_app_setting_get --app=$app --key=language)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
@ -34,21 +33,19 @@ upgrade_type=$(ynh_check_app_version_changed)
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=3
# Fix is_public as a boolean value
if [ "$is_public" = "Yes" ]; then
ynh_app_setting_set --app=$app --key=is_public --value=1
is_public=1
elif [ "$is_public" = "No" ]; then
ynh_app_setting_set --app=$app --key=is_public --value=0
is_public=0
fi
# If final_path doesn't exist, create it
if [ -z "$final_path" ]; then
final_path=/var/www/$app
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
fi
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================