summaryrefslogtreecommitdiffhomepage
path: root/auto/modules
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2021-03-25 16:15:03 +0300
committerValentin Bartenev <vbart@nginx.com>2021-03-25 16:15:03 +0300
commit067c6096e2ec306c4fdae6993140fbbdf4f9a6fd (patch)
tree8ac964daae973b007e0e683b496d5f1bf3450d62 /auto/modules
parentc849483862cba283a123354b9fda7687a9fa32fd (diff)
downloadunit-067c6096e2ec306c4fdae6993140fbbdf4f9a6fd.tar.gz
unit-067c6096e2ec306c4fdae6993140fbbdf4f9a6fd.tar.bz2
Node.js: used distinct placeholder for version in "package.json".
This makes the "sed" instruction simpler and more portable, as the previous variant didn't work well on BSD systems due to the "\s" metacharacter. Thanks to Sergey A. Osokin <osa@FreeBSD.org.ru> for spotting this issue. Also, this should prevent accidentally creating a version 1.0.0 package.
Diffstat (limited to 'auto/modules')
-rw-r--r--auto/modules/nodejs2
1 files changed, 1 insertions, 1 deletions
diff --git a/auto/modules/nodejs b/auto/modules/nodejs
index 100defe4..b2309143 100644
--- a/auto/modules/nodejs
+++ b/auto/modules/nodejs
@@ -170,7 +170,7 @@ ${NXT_NODE_VERSION_FILE}: ${NXT_VERSION_H}
${NXT_NODE_PACKAGE_FILE}: ${NXT_VERSION_H} src/nodejs/unit-http/package.json
mkdir -p ${NXT_BUILD_DIR}/src/${NXT_NODE}
- sed -e 's/"version"\s*:.*/"version": "\$(NXT_VERSION)",/' \
+ sed -e "s|%%VERSION%%|\$(NXT_VERSION)|" \
src/nodejs/unit-http/package.json > ${NXT_NODE_PACKAGE_FILE}
${NXT_NODE_TARBALL}: ${NXT_NODE}-copy