Skip to content

Commit 1fe2577

Browse files
committed
use nodejs 14, update deps, rework prebuild, bump version (#374)
1 parent 08fa0b8 commit 1fe2577

File tree

4,884 files changed

+330998
-30096
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,884 files changed

+330998
-30096
lines changed

.travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
language: node_js
22
node_js:
3-
- '10'
3+
- '14'
44
addons:
55
apt:
66
packages:
77
- jq
8+
- libavahi-compat-libdnssd-dev
89
branches:
910
only:
1011
- master

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ Es werden keine Spenden angenommen, ich würde mich jedoch darüber freuen wenn
137137
* [Steuerung von Miele Geräten](https://github.com/rdmtc/RedMatic/wiki/Steuerung-Miele)
138138
* [Subflow für Enigma2 Receiver](https://github.com/Matten-Matten/node-red-enigma2-flow)
139139
* [INSTAR Kameras anbinden](https://wiki.instar.de/Erweitert/Homematic_CCU3_und_RedMatic/)
140+
* [Subflow für Home24-Mediaplayer App](https://github.com/Matten-Matten/node-red-home24-mediaplayer-flow)
141+
* [EASY Push Subflow Push Nachrichten an EASY-Smarthome App oder Smartha App](https://github.com/Matten-Matten/Redmatic-EASY-Push-Flow)
140142
* Sonstiges
141143
* [Berichterstattung, Blogbeiträge, Videos über RedMatic](https://github.com/rdmtc/RedMatic/wiki/Berichterstattung)
142144
* [Node-RED Link Sammlung](https://github.com/rdmtc/RedMatic/wiki/Links)

addon_files/redmatic/lib/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@
1212
"node-red-contrib-mysensors": "3.3.1",
1313
"node-red-contrib-rfxcom": "2.11.1",
1414
"node-red-contrib-zigbee": "0.19.0",
15-
"node-red-contrib-johnny-five": "1.0.0-beta.1",
15+
"node-red-contrib-johnny-five": "1.0.0-beta.2",
1616
"node-red-contrib-enocean": "0.8.5",
1717
"redmatic-homekit": "3.2.2",
1818
"@node-red-contrib-themes/midnight-red": "1.4.4",
1919
"node-red-contrib-doorbird": "0.2.6",
2020
"node-red-contrib-comfoair": "0.0.5",
2121
"node-red-node-discovery": "0.0.22",
22-
"node-red-contrib-rcswitch2": "0.5.0",
2322
"node-red-contrib-chatbot": "0.19.6"
2423
}
2524
}

build.sh

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ mkdir $BUILD_DIR/dist 2> /dev/null
77
echo "installing build dependencies..."
88
npm install --only=dev --global-style --no-package-lock
99

10+
./build_addon.sh armv7l
1011
./build_addon.sh armv6l
1112
./build_addon.sh i686
1213

build_addon.sh

+29-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,40 @@
11
#!/bin/bash
22

3-
ARCH=${1:-armv6l}
3+
ARCH=${1:-armv7l}
44

55
BUILD_DIR=`cd ${0%/*} && pwd -P`
66

77
VERSION_ADDON=`jq -r '.version' package.json`
88
NODE_VERSION=`jq -r '.engines.node' package.json`
99

10-
if [ "$ARCH" == "i686" ]; then
10+
echo ""
11+
echo "Build RedMatic v$VERSION_ADDON ($ARCH)"
12+
echo ""
13+
14+
case $ARCH in
15+
x86_64)
16+
NODE_NAME=node-v${NODE_VERSION}-linux-x64
17+
;;
18+
i686)
1119
NODE_NAME=node-v${NODE_VERSION}-linux-x86
12-
NODE_URL=https://unofficial-builds.nodejs.org/download/release/v${NODE_VERSION}/${NODE_NAME}.tar.xz
13-
else
20+
;;
21+
*)
1422
NODE_NAME=node-v${NODE_VERSION}-linux-${ARCH}
23+
;;
24+
esac
25+
26+
case $ARCH in
27+
armv6l)
28+
NODE_URL=https://unofficial-builds.nodejs.org/download/release/v${NODE_VERSION}/${NODE_NAME}.tar.xz
29+
;;
30+
i686)
31+
# Todo - Node 14 i686 (32bit) build https://github.com/rdmtc/RedMatic/issues/374
32+
NODE_URL=https://unofficial-builds.nodejs.org/download/release/v${NODE_VERSION}/${NODE_NAME}.tar.xz
33+
;;
34+
*)
1535
NODE_URL=https://nodejs.org/dist/v${NODE_VERSION}/${NODE_NAME}.tar.xz
16-
fi
36+
;;
37+
esac
1738

1839
PREBUILT=$BUILD_DIR/prebuilt/$ARCH
1940

@@ -24,7 +45,7 @@ VERSION_FILE=$ADDON_TMP/redmatic/versions
2445
mkdir $ADDON_TMP 2> /dev/null || rm -r $ADDON_TMP/*
2546

2647
echo "download and extract Node.js $NODE_URL ..."
27-
curl --silent $NODE_URL | tar -xJf - -C $ADDON_TMP
48+
curl --silent $NODE_URL | tar -xJf - -C $ADDON_TMP || exit 1
2849
mv $ADDON_TMP/$NODE_NAME $ADDON_TMP/redmatic
2950
rm $ADDON_TMP/redmatic/README.md
3051
rm $ADDON_TMP/redmatic/CHANGELOG.md
@@ -40,7 +61,7 @@ cp $BUILD_DIR/assets/favicon/favicon-96x96.png $ADDON_TMP/redmatic/www/
4061

4162
echo "installing node modules..."
4263
if [ "$ARCH" == "i686" ]; then
43-
echo "removing raspberrypi specific modules..."
64+
echo "removing Raspberry Pi specific modules..."
4465
mv $ADDON_TMP/redmatic/lib/package.json $ADDON_TMP/redmatic/lib/package.json.tmp
4566
cat $ADDON_TMP/redmatic/lib/package.json.tmp | jq 'del(.dependencies."node-red-contrib-johnny-five",.dependencies."node-red-contrib-rcswitch2")' > $ADDON_TMP/redmatic/lib/package.json
4667
rm $ADDON_TMP/redmatic/lib/package.json.tmp
@@ -85,7 +106,7 @@ sed "s/var args = \['remove'/var args = ['remove','--no-package-lock'/" $INSTALL
85106

86107
cd $BUILD_DIR
87108

88-
if [ "$ARCH" == "armv6l" ]; then
109+
if [ "$ARCH" == "armv7l" ]; then
89110
ADDON_FILE=redmatic-$VERSION_ADDON.tar.gz
90111
else
91112
ADDON_FILE=redmatic-$ARCH-$VERSION_ADDON.tar.gz

build_packages.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ const crypto = require('crypto');
44
const pkgLib = require(__dirname + '/addon_files/redmatic/lib/package.json');
55
const redmaticVersion = require(__dirname + '/package.json').version;
66

7-
let tarch = process.argv[2] || 'armv6l';
7+
let tarch = process.argv[2] || 'armv7l';
88
let arch = '';
99

10-
if (tarch !== 'armv6l') {
10+
if (tarch !== 'armv7l') {
1111
arch = '-' + tarch;
1212
}
1313

@@ -26,9 +26,7 @@ const extraFiles = {
2626
'bin/pig2vcd',
2727
'bin/pigpiod',
2828
'bin/pigs',
29-
'lib/libpigpiod_if2.so',
30-
'lib/libpigpiod_if.so',
31-
'lib/libpigpio.so'
29+
'lib/libpigpio*',
3230
]
3331
};
3432

build_release_body.sh

+16-1
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,30 @@ echo "creating RELEASE_BODY.md"
1414

1515
DOWNLOAD="https://github.com/rdmtc/RedMatic/releases/download/v$VERSION_ADDON/redmatic-$VERSION_ADDON.tar.gz"
1616
DOWNLOAD_I686="https://github.com/rdmtc/RedMatic/releases/download/v$VERSION_ADDON/redmatic-i686-$VERSION_ADDON.tar.gz"
17+
DOWNLOAD_ARMV6L="https://github.com/rdmtc/RedMatic/releases/download/v$VERSION_ADDON/redmatic-armv6l-$VERSION_ADDON.tar.gz"
1718

1819
cat >RELEASE_BODY.md <<EOL
1920
### Downloads
2021
21-
#### CCU3, piVCCU3 und RaspberryMatic Varianten _rpi0_, _rpi3_, _rpi4_ und _tinkerboard_
22+
#### CCU3, piVCCU3 und RaspberryMatic Varianten _rpi3_, _rpi4_ und _tinkerboard_
2223
[![Downloads redmatic-$VERSION_ADDON](https://img.shields.io/github/downloads/rdmtc/RedMatic/v$VERSION_ADDON/redmatic-$VERSION_ADDON.tar.gz.svg)]($DOWNLOAD)
24+
EOL
25+
26+
if [ -f $BUILD_DIR/redmatic-armv6l-$VERSION_ADDON.tar.gz ]; then
27+
cat >>RELEASE_BODY.md <<EOL
28+
#### RaspberryMatic Variante _rpi0_
29+
[![Downloads redmatic-armv6l-$VERSION_ADDON](https://img.shields.io/github/downloads/rdmtc/RedMatic/v$VERSION_ADDON/redmatic-armv6l-$VERSION_ADDON.tar.gz.svg)]($DOWNLOAD_ARMV6L)
30+
EOL
31+
fi
32+
33+
if [ -f $BUILD_DIR/redmatic-i686-$VERSION_ADDON.tar.gz ]; then
34+
cat >>RELEASE_BODY.md <<EOL
2335
#### RaspberryMatic Varianten _ova_ und _intelnuc_
2436
[![Downloads redmatic-i686-$VERSION_ADDON](https://img.shields.io/github/downloads/rdmtc/RedMatic/v$VERSION_ADDON/redmatic-i686-$VERSION_ADDON.tar.gz.svg)]($DOWNLOAD_I686)
37+
EOL
38+
fi
2539

40+
cat >>RELEASE_BODY.md <<EOL
2641
2742
2843
### Changes

0 commit comments

Comments
 (0)