diff --git a/core/config/version b/core/config/version index 4e91350dcc..b3b7272746 100644 --- a/core/config/version +++ b/core/config/version @@ -1 +1 @@ -4.4.16 \ No newline at end of file +4.4.17 \ No newline at end of file diff --git a/docs/fr_FR/changelog.md b/docs/fr_FR/changelog.md index 3b571eb383..e85d1fd59a 100644 --- a/docs/fr_FR/changelog.md +++ b/docs/fr_FR/changelog.md @@ -1,5 +1,9 @@ # Changelog Jeedom V4.4 +# 4.4.17 + +- Passage de nodejs en version 20 (Debian 11 et plus) [LIEN](https://github.com/jeedom/core/pull/2846) + # 4.4.16 - Correction d'un bug sur les filtre de la page de remplacement [LIEN](https://github.com/jeedom/core/commit/ab0a197cf7ec99b7ae79db68ae9478afd3ffc6f1) diff --git a/resources/install_nodejs.sh b/resources/install_nodejs.sh index 2a0cc116c6..c3d301f223 100644 --- a/resources/install_nodejs.sh +++ b/resources/install_nodejs.sh @@ -1,7 +1,7 @@ -#!/bin/bash +#!/usr/bin/env bash -installVer='18' #NodeJS major version to be installed -minVer='18' #min NodeJS major version to be accepted +installVer='20' #NodeJS major version to be installed +minVer='20' #min NodeJS major version to be accepted # vérifier si toujours nécessaire, cette source traine encore sur certaines smart et si une source est invalide -> nodejs ne s'installera pas if ls /etc/apt/sources.list.d/deb-multimedia.list* &>/dev/null; then @@ -72,6 +72,18 @@ then fi fi +#buster doesn't support NodeJS 20 +lsb_release -c | grep buster +if [ $? -eq 0 ] +then + today=$(date +%Y%m%d) + if [[ "$today" > "20220630" ]]; + then + echo "== ATTENTION Debian 10 Buster n'est officiellement plus supportée depuis le 30 juin 2024, merci de mettre à jour votre distribution !!!" + exit 1 +fi +fi + #x86 32 bits not supported by nodesource anymore bits=$(getconf LONG_BIT) if { [ "$arch" = "i386" ] || [ "$arch" = "i686" ]; } && [ "$bits" -eq "32" ] @@ -133,9 +145,9 @@ else echo "Utilisation du dépot officiel" NODE_MAJOR=$installVer sudo mkdir -p /etc/apt/keyrings - sudo rm /etc/apt/keyrings/nodesource.gpg + [[ -f /etc/apt/keyrings/nodesource.gpg ]] && sudo rm /etc/apt/keyrings/nodesource.gpg || true curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg - sudo rm /etc/apt/sources.list.d/nodesource.list + [[ -f /etc/apt/sources.list.d/nodesource.list ]] && sudo rm /etc/apt/sources.list.d/nodesource.list || true echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list sudo apt-get update sudo DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs @@ -220,7 +232,7 @@ fi fi # on nettoie la priorité nodesource -sudo rm -f /etc/apt/preferences.d/nodesource &>/dev/null +[[ -f /etc/apt/preferences.d/nodesource ]] && sudo rm -f /etc/apt/preferences.d/nodesource &>/dev/null || true # on remet deb-multimedia si on l'a désactivé avant if [ -f /etc/apt/sources.list.d/deb-multimedia.list.disabled ]; then @@ -235,3 +247,6 @@ fi # sudo wget --quiet -O - http://repo.jeedom.com/odroid/conf/jeedom.gpg.key | sudo apt-key add - &>/dev/null # sudo apt-add-repository "deb http://repo.jeedom.com/odroid/ stable main" &>/dev/null # fi + +echo "Clean npm cache" +sudo npm cache clean --force \ No newline at end of file