Simplify and move getnodeversion.py
This commit is contained in:
parent
e0f10ecfd9
commit
895fa3a56b
@ -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)
|
@ -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'
|
||||
|
@ -75,7 +75,7 @@ if errorlevel 1 goto exit
|
||||
:msi
|
||||
@rem Skip msi generation if not requested
|
||||
if not defined msi goto run
|
||||
python "%~dp0tools\msvs\msi\getnodeversion.py" < "%~dp0src\node_version.h" > "%temp%\node_version.txt"
|
||||
python "%~dp0tools\getnodeversion.py" > "%temp%\node_version.txt"
|
||||
if not errorlevel 0 echo Cannot determine current version of node.js & goto exit
|
||||
for /F "tokens=*" %%i in (%temp%\node_version.txt) do set NODE_VERSION=%%i
|
||||
msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /t:Clean,Build /p:Configuration=%config% /p:NodeVersion=%NODE_VERSION% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
|
||||
|
Loading…
x
Reference in New Issue
Block a user