diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-11-11 12:08:24 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-11-11 12:09:48 -0800 |
commit | 895fa3a56bd74d7bbf6ee575408ab659ee51085c (patch) | |
tree | 0b8dcbfe3b7d7da5d177bb7c5c3fa1d76503a50c /tools | |
parent | e0f10ecfd9a3d957398382a51f664b1562501a7e (diff) | |
download | node-new-895fa3a56bd74d7bbf6ee575408ab659ee51085c.tar.gz |
Simplify and move getnodeversion.py
Diffstat (limited to 'tools')
-rw-r--r-- | tools/getnodeversion.py (renamed from tools/msvs/msi/getnodeversion.py) | 11 | ||||
-rwxr-xr-x | tools/osx-dist.sh | 2 |
2 files changed, 10 insertions, 3 deletions
diff --git a/tools/msvs/msi/getnodeversion.py b/tools/getnodeversion.py index 551d95d0e0..ddcecec46f 100644 --- a/tools/msvs/msi/getnodeversion.py +++ b/tools/getnodeversion.py @@ -1,9 +1,16 @@ -import sys,re; -for line in sys.stdin: +import os,re; + +node_version_h = os.path.join(os.path.dirname(__file__), '..', 'src', + 'node_version.h') + +f = open(node_version_h) + +for line in f: if re.match('#define NODE_MAJOR_VERSION', line): major = line.split()[2] if re.match('#define NODE_MINOR_VERSION', line): minor = line.split()[2] if re.match('#define NODE_PATCH_VERSION', line): patch = line.split()[2] + print '{0:s}.{1:s}.{2:s}'.format(major, minor, patch) diff --git a/tools/osx-dist.sh b/tools/osx-dist.sh index 98fb23203e..44849748bc 100755 --- a/tools/osx-dist.sh +++ b/tools/osx-dist.sh @@ -3,7 +3,7 @@ TOOLS=`dirname $0` ROOT=$TOOLS/.. -VERSION=`python $TOOLS/msvs/msi/getnodeversion.py < $ROOT/src/node_version.h` +VERSION=`python $TOOLS/getnodeversion.py` CONTENTS=$ROOT/dist-osx PMDOC=$TOOLS/osx-pkg.pmdoc VENDOR='org.nodejs' |