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

Directly use ynh_app_upstream_version to install node package

This commit is contained in:
tituspijean 2024-04-07 21:58:54 +02:00
parent 3b4abfc71c
commit 9aeac6e0a8
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720
3 changed files with 2 additions and 4 deletions

View file

@ -6,8 +6,6 @@
nodejs_version=20 nodejs_version=20
n8n_version=$(ynh_app_upstream_version)
timezone="$(cat /etc/timezone)" timezone="$(cat /etc/timezone)"
main_domain=$(cat /etc/yunohost/current_host) main_domain=$(cat /etc/yunohost/current_host)

View file

@ -59,7 +59,7 @@ ynh_script_progression --message="Installing $app..." --weight=2
pushd $install_dir pushd $install_dir
ynh_use_nodejs ynh_use_nodejs
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install n8n@${n8n_version} ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install n8n@$(ynh_app_upstream_version)
ynh_replace_string --match_string="secure: config_1.default.getEnv('userManagement.emails.smtp.secure'),$" \ ynh_replace_string --match_string="secure: config_1.default.getEnv('userManagement.emails.smtp.secure'),$" \
--replace_string="secure: config_1.default.getEnv('userManagement.emails.smtp.secure'), tls: {servername:'${main_domain}'}," \ --replace_string="secure: config_1.default.getEnv('userManagement.emails.smtp.secure'), tls: {servername:'${main_domain}'}," \
--target_file="node_modules/n8n/dist/UserManagement/email/NodeMailer.js" --target_file="node_modules/n8n/dist/UserManagement/email/NodeMailer.js"

View file

@ -82,7 +82,7 @@ ynh_script_progression --message="Installing $app..." --weight=2
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
pushd $install_dir pushd $install_dir
ynh_use_nodejs ynh_use_nodejs
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install n8n@${n8n_version} ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install n8n@$(ynh_app_upstream_version)
ynh_replace_string --match_string="secure: config_1.default.getEnv('userManagement.emails.smtp.secure'),$" \ ynh_replace_string --match_string="secure: config_1.default.getEnv('userManagement.emails.smtp.secure'),$" \
--replace_string="secure: config_1.default.getEnv('userManagement.emails.smtp.secure'), tls: {servername:'${main_domain}'}," \ --replace_string="secure: config_1.default.getEnv('userManagement.emails.smtp.secure'), tls: {servername:'${main_domain}'}," \
--target_file="node_modules/n8n/dist/UserManagement/email/NodeMailer.js" --target_file="node_modules/n8n/dist/UserManagement/email/NodeMailer.js"