summaryrefslogtreecommitdiffhomepage
path: root/auto/modules/nodejs
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2021-06-15 10:35:15 +0300
committerMax Romanov <max.romanov@nginx.com>2021-06-15 10:35:15 +0300
commita1d2ced6fc2317d36bc917c5d0ac339bc647dc34 (patch)
tree05f845dd2f5a3654cd9b1c47e5b48a968c1efbb0 /auto/modules/nodejs
parent9e711cf640d296e7afc591dbf5cfe386ee8735a0 (diff)
downloadunit-a1d2ced6fc2317d36bc917c5d0ac339bc647dc34.tar.gz
unit-a1d2ced6fc2317d36bc917c5d0ac339bc647dc34.tar.bz2
Node.js: improving and test packaging.
The patch removes the "files" section from package.json to avoid future issues with missing files. For package testing purposes, 'npm pack' is used instead of plain 'tar' to simulate packaging more accurately.
Diffstat (limited to '')
-rw-r--r--auto/modules/nodejs7
1 files changed, 5 insertions, 2 deletions
diff --git a/auto/modules/nodejs b/auto/modules/nodejs
index b2309143..7d4f8581 100644
--- a/auto/modules/nodejs
+++ b/auto/modules/nodejs
@@ -157,6 +157,7 @@ ${NXT_NODE}-copy: ${NXT_NODE_VERSION_FILE} ${NXT_NODE_PACKAGE_FILE}
mkdir -p ${NXT_NODE_TMP}
cp -rp src/nodejs/unit-http/* ${NXT_NODE_TMP}/
cp -p ${NXT_NODE_VERSION_FILE} ${NXT_NODE_PACKAGE_FILE} ${NXT_NODE_TMP}/
+ rm -f ${NXT_NODE_TMP}/binding_pub.gyp
${NXT_NODE}-copy-g: ${NXT_NODE_VERSION_FILE} ${NXT_NODE_PACKAGE_FILE}
mkdir -p ${NXT_NODE_TMP_G}
@@ -174,10 +175,12 @@ ${NXT_NODE_PACKAGE_FILE}: ${NXT_VERSION_H} src/nodejs/unit-http/package.json
src/nodejs/unit-http/package.json > ${NXT_NODE_PACKAGE_FILE}
${NXT_NODE_TARBALL}: ${NXT_NODE}-copy
- tar -zcvf ${NXT_NODE_TARBALL} -C ${NXT_NODE_TMP} .
+ cd ${NXT_NODE_TMP} && npm pack
+ mv ${NXT_NODE_TMP}/unit-http-\$(NXT_VERSION).tgz ${NXT_NODE_TARBALL}
${NXT_NODE_TARBALL_G}: ${NXT_NODE}-copy-g
- tar -zcvf ${NXT_NODE_TARBALL_G} -C ${NXT_NODE_TMP_G} .
+ cd ${NXT_NODE_TMP_G} && npm pack
+ mv ${NXT_NODE_TMP_G}/unit-http-\$(NXT_VERSION).tgz ${NXT_NODE_TARBALL_G}
install: ${NXT_NODE}-$NXT_NODE_INSTALL