Skip to content

Commit

Permalink
Merge pull request #2894 from jeedom/beta
Browse files Browse the repository at this point in the history
Stable 4.4.17
  • Loading branch information
zoic21 authored Sep 12, 2024
2 parents b1deebe + cbc767e commit 2d03463
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
2 changes: 1 addition & 1 deletion core/config/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.4.16
4.4.17
4 changes: 4 additions & 0 deletions docs/fr_FR/changelog.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
27 changes: 21 additions & 6 deletions resources/install_nodejs.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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" ]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

0 comments on commit 2d03463

Please sign in to comment.