diff options
author | Alexander Borisov <alexander.borisov@nginx.com> | 2019-01-23 17:47:53 +0300 |
---|---|---|
committer | Alexander Borisov <alexander.borisov@nginx.com> | 2019-01-23 17:47:53 +0300 |
commit | 2bc8fb7b43a5106ab8cdf8adae4834837ae7fc16 (patch) | |
tree | 9e33c948504366fe7de713c3020d2e39360d9a25 /auto/modules/nodejs | |
parent | fd6a6a5514c420dae2b393f62fee65f87758dec9 (diff) | |
download | unit-2bc8fb7b43a5106ab8cdf8adae4834837ae7fc16.tar.gz unit-2bc8fb7b43a5106ab8cdf8adae4834837ae7fc16.tar.bz2 |
Node.js: fixed module version on installation from sources.
Diffstat (limited to '')
-rw-r--r-- | auto/modules/nodejs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/auto/modules/nodejs b/auto/modules/nodejs index e0208f5d..57bf9d3a 100644 --- a/auto/modules/nodejs +++ b/auto/modules/nodejs @@ -145,6 +145,8 @@ cat << END >> $NXT_MAKEFILE .PHONY: ${NXT_NODE}-build .PHONY: ${NXT_NODE}-publish +NXT_UNIT_VERSION=\$(shell grep 'define NXT_VERSION' \ + src/nxt_main.h | sed -e 's/^.*"\(.*\)".*/\1/') ${NXT_NODE}: ${NXT_NODE}-copy $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC ${NXT_NODE_EXPORTS} && \\ @@ -161,6 +163,9 @@ ${NXT_NODE_VERSION_FILE}: src/nxt_main.h | sed -e 's/[^0-9]//g' >> $NXT_NODE_VERSION_FILE ${NXT_NODE_TARBALL}: ${NXT_NODE}-copy + sed -e 's/"version"\s*:.*/"version": "\$(NXT_UNIT_VERSION).0",/' \ + ${NXT_NODE_TMP}/package.json > ${NXT_NODE_TMP}/package.json.tmp + mv ${NXT_NODE_TMP}/package.json.tmp ${NXT_NODE_TMP}/package.json tar -zcvf ${NXT_NODE_TARBALL} -C ${NXT_NODE_TMP} . |