Merge pull request #6 from YunoHost-Apps/testing

Testing
This commit is contained in:
Éric Gaspar 2021-09-19 15:24:10 +02:00 committed by GitHub
commit 531c0a6b1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 6 additions and 31 deletions

View File

@ -3,4 +3,3 @@ SOURCE_SUM=6b4e072f23325edd47666bdc6edf0e428c5e4ced22d8a5d3ffa9ca12be63b7cb
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=

View File

@ -29,8 +29,7 @@
"install" : [
{
"name": "domain",
"type": "domain",
"example": "example.com"
"type": "domain"
},
{
"name": "is_public",

View File

@ -4,14 +4,8 @@
# COMMON VARIABLES
#=================================================
# dependencies used by the app
#pkg_dependencies="redis-server"
nodejs_version=15
# dependencies used by the app
pkg_dependencies="redis-server"
#=================================================
# PERSONAL HELPERS
#=================================================
@ -24,8 +18,6 @@ pkg_dependencies="redis-server"
# FUTURE OFFICIAL HELPERS
#=================================================
#!/bin/bash
# get the first available redis database
#
# usage: ynh_redis_get_free_db

View File

@ -121,7 +121,7 @@ chown $app:$app "$final_path/server/config.js"
ynh_script_progression --message="Starting a systemd service..." --weight=1
# Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #--line_match="HTTP Server listening"
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
#=================================================
# RELOAD NGINX

View File

@ -64,8 +64,6 @@ ynh_app_setting_set --app=$app --key=port --value=$port
#=================================================
ynh_script_progression --message="Installing dependencies..." --weight=20
ynh_install_app_dependencies $pkg_dependencies
# Install Nodejs
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version

View File

@ -46,9 +46,6 @@ ynh_remove_systemd_config
#=================================================
ynh_script_progression --message="Removing dependencies..." --weight=1
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
ynh_remove_nodejs
#=================================================

View File

@ -74,9 +74,6 @@ chmod +x "$final_path/server/bin/prod.js"
#=================================================
ynh_script_progression --message="Reinstalling dependencies..." --weight=7
# Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies
# Install Nodejs
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version

View File

@ -103,8 +103,6 @@ ynh_add_nginx_config
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=18
ynh_install_app_dependencies $pkg_dependencies
# Install Nodejs
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
@ -118,16 +116,11 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=16
#pushd "$final_path"
# ynh_use_nodejs
# ynh_exec_warn_less ynh_npm install
# ynh_exec_warn_less ynh_npm run build
#popd
pushd "$final_path"
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm install
ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm run build
popd
popd
fi
#=================================================