summaryrefslogtreecommitdiff
path: root/tools/getnodeisrelease.py
blob: a23ad2cf2443e57eb3a3e8b97a6cc6e56318537d (plain)
1
2
3
4
5
6
7
8
9
10
11
import sys,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_VERSION_IS_RELEASE', line):
    release = int(line.split()[2])
    print release