Skip to content

Commit

Permalink
Merge pull request #2296 from jeedom/alpha
Browse files Browse the repository at this point in the history
Merge
  • Loading branch information
zoic21 authored Sep 30, 2023
2 parents 7bc828b + b926c81 commit 8e04b18
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 154 deletions.
61 changes: 0 additions & 61 deletions .github/workflows/codeLintGlobal.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/lint_Php73.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/lint_Php74.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
on:
# Create branch > prettier / this workflows create commit on branch prettier.
push:
branches:
- prettier
pull_request:
branches:
- prettier

name : 'Prettier Plugin Jeedom'

jobs:
prettier:
uses: jeedom/workflows/.github/workflows/prettier.yml@main
21 changes: 21 additions & 0 deletions .github/workflows/work.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
# Workflows check plugin Jeedom
push:
branches:
- alpha
- beta
pull_request:
branches:
- alpha
- beta
- V4-stable

name : 'Test Core Jeedom'

jobs:
codeLintGlobal:
uses: jeedom/workflows/.github/workflows/codeLintGlobal.yml@main
php73:
uses: jeedom/workflows/.github/workflows/lint_Php73.yml@main
php74:
uses: jeedom/workflows/.github/workflows/lint_Php74.yml@main
6 changes: 6 additions & 0 deletions core/class/event.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ public static function getFileDescriptorLock() {
public static function add($_event, $_option = array()) {
$waitIfLocked = true;
$fd = self::getFileDescriptorLock();
if($fd === false){
return;
}
if (@flock($fd, LOCK_EX, $waitIfLocked)) {
$cache = cache::byKey('event');
$value = json_decode($cache->getValue('[]'), true);
Expand All @@ -57,6 +60,9 @@ public static function add($_event, $_option = array()) {
public static function adds($_event, $_values = array()) {
$waitIfLocked = true;
$fd = self::getFileDescriptorLock();
if($fd === false){
return;
}
if (flock($fd, LOCK_EX, $waitIfLocked)) {
$cache = cache::byKey('event');
$value_src = json_decode($cache->getValue('[]'), true);
Expand Down
29 changes: 16 additions & 13 deletions mobile/js/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -579,19 +579,22 @@ jeedomUtils.initApplication = function(_reinit) {
} else {
if (redirect != '' && APP_MODE == true) {
jeedom.plugin.get({
id : redirect,
async:false,
error: function (error) {
alert('Erreur sur affichage du panel');
},
success: function (data) {
if(data.mobile == 'panel'){
jeedomUtils.loadPage('panel', 'Plugin', '', redirect)
}else{
jeedomUtils.loadPage(redirect, 'Plugin', '', redirect)
}
}
})
id : redirect,
async:false,
error: function (error) {
jeedomUtils.showAlert({
message: 'Erreur sur affichage du panel',
level: 'danger'
})
},
success: function (data) {
if (data.mobile != '') {
jeedomUtils.loadPage(data.mobile, 'Plugin', '', redirect)
}else{
jeedomUtils.loadPage(redirect, 'Plugin', '', redirect)
}
}
})
}else{
jeedomUtils.loadPage('home', '{{Accueil}}')
}
Expand Down
31 changes: 11 additions & 20 deletions resources/install_nodejs.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

installVer='16' #NodeJS major version to be installed
minVer='16' #min NodeJS major version to be accepted
installVer='18' #NodeJS major version to be installed
minVer='15' #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 @@ -95,25 +95,16 @@ else
if [[ $arch == "armv6l" ]]
then
#version to install for armv6 (to check on https://unofficial-builds.nodejs.org)
if [[ $installVer == "12" ]]
then
if [[ $installVer == "12" ]]; then
armVer="12.22.12"
fi
if [[ $installVer == "13" ]]
then
armVer="13.14.0"
fi
if [[ $installVer == "14" ]]
then
armVer="14.19.2"
fi
if [[ $installVer == "15" ]]
then
armVer="15.14.0"
fi
if [[ $installVer == "16" ]]
then
armVer="16.15.0"
elif [[ $installVer == "14" ]]; then
armVer="14.21.3"
elif [[ $installVer == "16" ]]; then
armVer="16.20.2"
elif [[ $installVer == "18" ]]; then
armVer="18.18.0"
elif [[ $installVer == "20" ]]; then
armVer="20.8.0"
fi
echo "Jeedom Mini ou Raspberry 1, 2 ou zéro détecté, non supporté mais on essaye l'utilisation du paquet non-officiel ${armVer} pour armv6l"
wget https://unofficial-builds.nodejs.org/download/release/${armVer}/node-v${armVer}-linux-armv6l.tar.gz
Expand Down

0 comments on commit 8e04b18

Please sign in to comment.