~yolanda.robla/ubuntu/trusty/nodejs/add_distribution

« back to all changes in this revision

Viewing changes to tools/getprevnodeversion.py

  • Committer: Package Import Robot
  • Author(s): Jérémy Lal
  • Date: 2013-08-14 00:16:46 UTC
  • mfrom: (7.1.40 sid)
  • Revision ID: package-import@ubuntu.com-20130814001646-bzlysfh8sd6mukbo
Tags: 0.10.15~dfsg1-4
* Update 2005 patch, adding a handful of tests that can fail on
  slow platforms.
* Add 1004 patch to fix test failures when writing NaN to buffer
  on mipsel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import os,re
 
2
 
 
3
node_version_h = os.path.join(os.path.dirname(__file__), '..', 'src',
 
4
    'node_version.h')
 
5
 
 
6
f = open(node_version_h)
 
7
 
 
8
for line in f:
 
9
  if re.match('#define NODE_MAJOR_VERSION', line):
 
10
    major = line.split()[2]
 
11
  if re.match('#define NODE_MINOR_VERSION', line):
 
12
    minor = line.split()[2]
 
13
  if re.match('#define NODE_PATCH_VERSION', line):
 
14
    patch = int(line.split()[2]) - 1
 
15
 
 
16
print '%(major)s.%(minor)s.%(patch)s'% locals()