From a0a88a88a304a145f5bfcfda69ac6d58d3017001 Mon Sep 17 00:00:00 2001 From: Amitosh Swain Mahapatra Date: Wed, 16 Aug 2023 09:15:19 +0530 Subject: [PATCH] Update script for packaging inside docker --- test-docker.sh | 15 +++++++++++++++ test_alpine.sh | 12 ------------ 2 files changed, 15 insertions(+), 12 deletions(-) create mode 100755 test-docker.sh delete mode 100755 test_alpine.sh diff --git a/test-docker.sh b/test-docker.sh new file mode 100755 index 00000000..7936cf7d --- /dev/null +++ b/test-docker.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +set -xe + +echo "Running on $(node -v)" + +# Cleanup +rm -rf node_modules build-tmp-* lib/binding + +# Install build dependencies +if [ -f /etc/alpine-release ]; then + apk add --no-cache --virtual .build-deps make gcc g++ python3 +fi + +su node -c "npm test; npx node-pre-gyp package" diff --git a/test_alpine.sh b/test_alpine.sh deleted file mode 100755 index f23af5c8..00000000 --- a/test_alpine.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -set -xe - -echo "Running on $(node -v)" - -apk add make g++ python -npm test --unsafe-perm - -./node_modules/.bin/node-pre-gyp configure -./node_modules/.bin/node-pre-gyp build -./node_modules/.bin/node-pre-gyp package