0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/tools/msi/getnodeversion.py
2011-10-11 10:29:03 -07:00

10 lines
332 B
Python

import sys,re;
for line in sys.stdin:
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}.0'.format(major, minor, patch)