diff options
Diffstat (limited to 'auto/modules/nodejs')
-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} . |