From 2d5645eb70519c0a1966fc087a3568f888feacb3 Mon Sep 17 00:00:00 2001 From: Don White Date: Thu, 12 Dec 2024 16:31:46 -0500 Subject: [PATCH] changes to switch to use Node 20, and help dwhite license issue (#86) * changes to switch to use Node 20, and add lines to help dwhite work around license issue. * Changed/Added code to handle using the content of a license file or the license file itself --- binding.gyp | 2 +- build-support/scripts/up | 18 ++++++++++++++++-- dockers/slim/Dockerfile | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/binding.gyp b/binding.gyp index 72cc674..7947a21 100644 --- a/binding.gyp +++ b/binding.gyp @@ -42,7 +42,7 @@ "-Wall", "-Werror", "-Wextra", - "-std=c++14" + "-std=c++17" ], "variables": { "nuodb_client_package": "/dev/null; then echo "Environment already created." @@ -29,8 +34,17 @@ docker exec ad1 nuocmd check servers --check-leader --check-connected --timeout echo "Connected!" # Apply limited license -echo -n "Applying license.. " -docker exec -e "NUODB_LIMITED_LICENSE_CONTENT=$NUODB_LIMITED_LICENSE_CONTENT" ad1 /bin/bash -c 'echo "$NUODB_LIMITED_LICENSE_CONTENT" | base64 -d > ~/nuodb.lic && nuocmd set license --license-file ~/nuodb.lic && rm ~/nuodb.lic' +echo "Applying license.. " +if [ -n "${NUODB_LIMITED_LICENSE_CONTENT}" ]; then + echo "using LICENSE CONTENT" + docker exec -e "NUODB_LIMITED_LICENSE_CONTENT=${NUODB_LIMITED_LICENSE_CONTENT}" ad1 /bin/bash -c 'echo "${NUODB_LIMITED_LICENSE_CONTENT}" | base64 -d > ~/nuodb.lic && /opt/nuodb/bin/nuocmd set license --license-file ~/nuodb.lic && rm ~/nuodb.lic' +elif [ -n "${NUODB_LIMITED_LICENSE}" ]; then + echo "using LICENSE" + docker cp ${NUODB_LIMITED_LICENSE} ad1:/tmp/nuodb.lic + docker exec ad1 /opt/nuodb/bin/nuocmd set license --license-file /tmp/nuodb.lic +else + echo "No License applied" +fi echo "Done!" echo #changed to properly create and mount volumes diff --git a/dockers/slim/Dockerfile b/dockers/slim/Dockerfile index 0541ff8..1577938 100644 --- a/dockers/slim/Dockerfile +++ b/dockers/slim/Dockerfile @@ -37,7 +37,7 @@ RUN npm run build # ------------------------------------- # release image -FROM node:18-slim AS release +FROM node:20-slim AS release COPY --from=build /opt/nuodb/lib64 /opt/nuodb/lib64 COPY --from=build /src /src