FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node/tools/getnodeversion.py at buffer-transcode-error · starkwang/node · GitHub
starkwang
/
node
Public
forked from
nodejs/node
Notifications
You must be signed in to change notification settings
Fork
1
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
node
/
tools
/
getnodeversion.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
20 lines (16 loc) · 457 Bytes
Breadcrumbs
node
/
tools
/
getnodeversion.py
Copy path
File metadata and controls
20 lines (16 loc) · 457 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import
os
import
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
'%(major)s.%(minor)s.%(patch)s'
%
locals
()
Back
|
FazBrowse Home
|
New Git URL