Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to v1.3.3, patch change_url #23

Merged
merged 7 commits into from Apr 22, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -11,7 +11,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
## Overview
Flow-based programming for the Internet of Things.

**Shipped version:** 1.2.9
**Shipped version:** 1.3.1

## Screenshots

Expand Down Expand Up @@ -43,8 +43,8 @@ Since Node-Red can handle sensitive automation, the app is always installed in p

#### Supported architectures

* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/nodered%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/nodered/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/nodered%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/nodered/)
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/nodered.svg)](https://ci-apps.yunohost.org/ci/apps/nodered/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/nodered.svg)](https://ci-apps-arm.yunohost.org/ci/apps/nodered/)

## Links

Expand Down
6 changes: 3 additions & 3 deletions README_fr.md
Expand Up @@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
## Vue d'ensemble
Programmation par flux de données pour l'Internet des objets.

**Version incluse :** 1.2.9
**Version incluse :** 1.3.1

## Captures d'écran

Expand Down Expand Up @@ -43,8 +43,8 @@ Puisque les automatisations gérées par Node-Red peuvent être sensibles, l'app

#### Supported architectures

* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/nodered%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/nodered/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/nodered%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/nodered/)
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/nodered.svg)](https://ci-apps.yunohost.org/ci/apps/nodered/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/nodered.svg)](https://ci-apps-arm.yunohost.org/ci/apps/nodered/)

## Liens

Expand Down
6 changes: 5 additions & 1 deletion check_process
Expand Up @@ -19,6 +19,7 @@
setup_public=0 #Considering the sensitive actions this app can do, I prefer to have it private
upgrade=1
upgrade=0 from_commit=567fc9435804add272fa4ae48a7cf1ec5f173d2d
upgrade=1 from_commit=453b13703bb418a7da33ed4f3e96a486b365d865
backup_restore=1
multi_instance=1
port_already_use=1
Expand All @@ -29,4 +30,7 @@ Notification=none
;;; Upgrade options
; commit=CommitHash
name=Name and date of the commit.
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666&
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&password=pass&port=666&
; commit=453b13703bb418a7da33ed4f3e96a486b365d865
name=v1.2.9 2021-02-20
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&password=pass&port=666&
4 changes: 2 additions & 2 deletions conf/app.src
@@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/node-red/node-red/releases/download/1.2.9/node-red-1.2.9.zip
SOURCE_SUM=bed0649f9214b34fef80496b7477b891f4f5d3dc5a767d8622da23875dc93f27
SOURCE_URL=https://github.com/node-red/node-red/releases/download/1.3.1/node-red-1.3.1.zip
SOURCE_SUM=5801EC18F9D5A932533092228D5190E528E88784DAC401C12D055A6C36D9A753
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=true
Expand Down
12 changes: 2 additions & 10 deletions manifest.json
Expand Up @@ -6,15 +6,15 @@
"en": "Flow-based programming for the Internet of Things",
"fr": "Programmation par flux de données pour l'Internet des objets"
},
"version": "1.2.9~ynh1",
"version": "1.3.1~ynh1",
"url": "https://nodered.org",
"license": "Apache-2.0",
"maintainer": {
"name": "tituspijean",
"email": "tituspijean@outlook.com"
},
"requirements": {
"yunohost": ">= 3.8.1"
"yunohost": ">= 4.1.7"
},
"multi_instance": true,
"services": [
Expand All @@ -25,19 +25,11 @@
{
"name": "domain",
"type": "domain",
"ask": {
"en": "Choose a domain name for Node-RED",
"fr": "Choisissez un nom de domaine pour Node-RED"
},
"example": "example.com"
},
{
"name": "path",
"type": "path",
"ask": {
"en": "Choose a path for Node-RED",
"fr": "Choisissez un chemin pour Node-RED"
},
"example": "/nodered",
"default": "/nodered"
}
Expand Down
17 changes: 17 additions & 0 deletions scripts/change_url
Expand Up @@ -30,6 +30,23 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
port=$(ynh_app_setting_get --app=$app --key=port)

#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --time --weight=1

# Backup the current version of the app
ynh_backup_before_upgrade
ynh_clean_setup () {
# Remove the new domain config file, the remove script won't do it as it doesn't know yet its location.
ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"

# Restore it if the upgrade fails
ynh_restore_upgradebackup
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors

#=================================================
# CHECK WHICH PARTS SHOULD BE CHANGED
#=================================================
Expand Down
1 change: 0 additions & 1 deletion scripts/install
Expand Up @@ -43,7 +43,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

#=================================================
# STANDARD MODIFICATIONS
Expand Down
10 changes: 0 additions & 10 deletions scripts/upgrade
Expand Up @@ -19,7 +19,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)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
port=$(ynh_app_setting_get --app=$app --key=port)

#=================================================
Expand All @@ -33,15 +32,6 @@ upgrade_type=$(ynh_check_app_version_changed)
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1

# 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
Expand Down