Added trailing zero to version string.

While it looks nicer without zero 3-rd version number, this should
improve interoperability.  Version string can be parsed or used for
sorting.  And it is easier to handle and less confusing when there
is constant number of version parts.

Moreover, NPM also expects version format with 3 parts.
So ".0" has already been used in Node.js module version.
This commit is contained in:
Valentin Bartenev
2019-02-27 17:25:28 +03:00
parent e929d08201
commit 5c9fe8c306
3 changed files with 3 additions and 3 deletions

View File

@@ -158,7 +158,7 @@ ${NXT_NODE_VERSION_FILE}: ${NXT_VERSION_H}
$echo '#define NXT_NODE_VERNUM \$(NXT_VERNUM)' > $NXT_NODE_VERSION_FILE
${NXT_NODE_TARBALL}: ${NXT_NODE}-copy
sed -e 's/"version"\s*:.*/"version": "\$(NXT_VERSION).0",/' \
sed -e 's/"version"\s*:.*/"version": "\$(NXT_VERSION)",/' \
${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} .

View File

@@ -13,7 +13,7 @@ copy:
cp -rp ../../src/nodejs/unit-http .
echo '#define NXT_NODE_VERNUM ${VERNUM}' > unit-http/version.h
mv unit-http/binding_pub.gyp unit-http/binding.gyp
sed -e 's/"version"\s*:.*/"version": "${VERSION}.0",/' \
sed -e 's/"version"\s*:.*/"version": "${VERSION}",/' \
unit-http/package.json > unit-http/package.json.tmp
mv unit-http/package.json.tmp unit-http/package.json

View File

@@ -1,5 +1,5 @@
# Copyright (C) NGINX, Inc.
NXT_VERSION=1.8
NXT_VERSION=1.8.0
NXT_VERNUM=10800