diff --git a/.arg b/.arg index b55f22b..ee120d5 100644 --- a/.arg +++ b/.arg @@ -1,2 +1,2 @@ -ZWAVE_JS_VERSION=12.4.3 +ZWAVE_JS_VERSION=12.4.4 ZWAVE_JS_SERVER_VERSION=1.34.0 diff --git a/Earthfile b/Earthfile index bc0408b..802569b 100644 --- a/Earthfile +++ b/Earthfile @@ -1,12 +1,10 @@ VERSION 0.7 -FROM alpine:3.18 +FROM node:20-slim WORKDIR /app -RUN apk add --no-cache \ - nodejs=18.18.2-r0 \ - tzdata +RUN apt-get update && apt-get upgrade -y all: BUILD \ @@ -22,23 +20,12 @@ test: --platform=linux/arm64 \ +docker-test -build-deps: - RUN apk add --no-cache \ - g++ \ - git \ - linux-headers \ - make \ - npm \ - python3 - +build: RUN npm config set \ fetch-retries 5 \ fetch-retry-mintimeout 100000 \ fetch-retry-maxtimeout 600000 -build: - FROM +build-deps - ARG --required ZWAVE_JS_VERSION ARG --required ZWAVE_JS_SERVER_VERSION ARG ZWAVE_JS_PACKAGE=zwave-js@$ZWAVE_JS_VERSION @@ -46,16 +33,11 @@ build: ARG ZWAVE_JS_FLASH_PACKAGE=@zwave-js/flash@$ZWAVE_JS_VERSION ARG NPM_INSTALL_EXTRA_FLAGS - # Prebuilt binaries for node serialport and Alpine are broken, so we - # rebuild from source: - # https://github.com/serialport/bindings-cpp/issues/139 - # https://github.com/serialport/node-serialport/issues/2438 RUN npm install \ $NPM_INSTALL_EXTRA_FLAGS \ $ZWAVE_JS_SERVER_PACKAGE \ $ZWAVE_JS_FLASH_PACKAGE \ - $ZWAVE_JS_PACKAGE \ - && npm rebuild --prefer-offline --build-from-source @serialport/bindings-cpp + $ZWAVE_JS_PACKAGE SAVE ARTIFACT /app @@ -70,7 +52,7 @@ docker: /cache/db \ /logs - RUN apk add --no-cache \ + RUN apt-get install -y \ tini ARG EARTHLY_GIT_SHORT_HASH