work around perl's weirdness with executing cvs.exe after changing STDOUT for cvs2cl.pl
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5002 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
8c04e65bb6
commit
f8a810ba45
1 changed files with 31 additions and 17 deletions
|
@ -111,13 +111,21 @@ def exit(log_dir = '.'):
|
||||||
log('\nerror occurred, exiting', log_dir)
|
log('\nerror occurred, exiting', log_dir)
|
||||||
sys.exit(3)
|
sys.exit(3)
|
||||||
|
|
||||||
def run(command, log_name, err, wanted_ret = 0, log_dir = '.'):
|
LOG_ERRORS = 2
|
||||||
|
LOG_ALL = 1
|
||||||
|
LOG_NOTHING = 0
|
||||||
|
|
||||||
|
def run(command, log_level, err, wanted_ret = 0, log_dir = '.'):
|
||||||
log('\nrunning %s\n' % command, log_dir)
|
log('\nrunning %s\n' % command, log_dir)
|
||||||
|
|
||||||
if log_name:
|
if log_level == LOG_ERRORS:
|
||||||
|
cmd = '%s 2>> %s\\release-%s.log' % (command, log_dir, VERSION)
|
||||||
|
elif log_level == LOG_ALL:
|
||||||
cmd = '%s >> %s\\release-%s.log 2>&1' % (command, log_dir, VERSION)
|
cmd = '%s >> %s\\release-%s.log 2>&1' % (command, log_dir, VERSION)
|
||||||
else:
|
elif log_level == LOG_NOTHING:
|
||||||
cmd = command
|
cmd = command
|
||||||
|
else:
|
||||||
|
raise ValueError
|
||||||
|
|
||||||
ret = os.system(cmd)
|
ret = os.system(cmd)
|
||||||
|
|
||||||
|
@ -150,7 +158,7 @@ def RunTests():
|
||||||
|
|
||||||
run(
|
run(
|
||||||
'scons -C .. test',
|
'scons -C .. test',
|
||||||
'test',
|
LOG_ALL,
|
||||||
'tests failed - see test.log for details'
|
'tests failed - see test.log for details'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -183,7 +191,7 @@ def CommitMenuImage():
|
||||||
|
|
||||||
run(
|
run(
|
||||||
'%s commit -m %s ..\\Menu\\images\\header.gif' % (CVS, VERSION),
|
'%s commit -m %s ..\\Menu\\images\\header.gif' % (CVS, VERSION),
|
||||||
'header.gif.commit',
|
LOG_ALL,
|
||||||
'failed committing header.gif'
|
'failed committing header.gif'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -194,19 +202,19 @@ def TestInstaller():
|
||||||
|
|
||||||
run(
|
run(
|
||||||
'scons -C .. VERSION=test PREFIX=%s\\insttestscons install dist-installer' % os.getcwd(),
|
'scons -C .. VERSION=test PREFIX=%s\\insttestscons install dist-installer' % os.getcwd(),
|
||||||
'inst',
|
LOG_ALL,
|
||||||
'installer creation failed'
|
'installer creation failed'
|
||||||
)
|
)
|
||||||
|
|
||||||
run(
|
run(
|
||||||
'..\\nsis-test-setup.exe /S /D=%s\\insttest' % os.getcwd(),
|
'..\\nsis-test-setup.exe /S /D=%s\\insttest' % os.getcwd(),
|
||||||
None,
|
LOG_NOTHING,
|
||||||
'installer failed'
|
'installer failed'
|
||||||
)
|
)
|
||||||
|
|
||||||
run(
|
run(
|
||||||
'diff -r insttest insttestscons | grep -v uninst-nsis.exe',
|
'diff -r insttest insttestscons | grep -v uninst-nsis.exe',
|
||||||
'diff',
|
LOG_ALL,
|
||||||
'scons and installer installations differ',
|
'scons and installer installations differ',
|
||||||
1
|
1
|
||||||
)
|
)
|
||||||
|
@ -216,7 +224,7 @@ def Tag():
|
||||||
|
|
||||||
run(
|
run(
|
||||||
'%s -z3 tag -R %s ..' % (CVS, CVS_TAG),
|
'%s -z3 tag -R %s ..' % (CVS, CVS_TAG),
|
||||||
'tag',
|
LOG_ALL,
|
||||||
'failed creating tag %s' % CVS_TAG
|
'failed creating tag %s' % CVS_TAG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -225,7 +233,7 @@ def Export():
|
||||||
|
|
||||||
run(
|
run(
|
||||||
'%s -z3 export -r %s -d %s NSIS' % (CVS, CVS_TAG, newverdir),
|
'%s -z3 export -r %s -d %s NSIS' % (CVS, CVS_TAG, newverdir),
|
||||||
'export',
|
LOG_ALL,
|
||||||
'export failed'
|
'export failed'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -240,8 +248,14 @@ def CreateChangeLog():
|
||||||
changelog = os.path.join(newverdir,'ChangeLog')
|
changelog = os.path.join(newverdir,'ChangeLog')
|
||||||
|
|
||||||
run(
|
run(
|
||||||
'%s -x %s %s --show-tag %s --file %s ..' % (CVS2CL_PERL, CVS2CL, CVS2CL_OPTS, CVS_TAG, changelog),
|
'%s log > cvs.log' % CVS,
|
||||||
'changelog',
|
LOG_ERRORS,
|
||||||
|
'cvs log failed'
|
||||||
|
)
|
||||||
|
|
||||||
|
run(
|
||||||
|
'%s -x %s %s --show-tag %s --file %s --stdin < cvs.log' % (CVS2CL_PERL, CVS2CL, CVS2CL_OPTS, CVS_TAG, changelog),
|
||||||
|
LOG_ALL,
|
||||||
'changelog failed'
|
'changelog failed'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -254,7 +268,7 @@ def CreateSourceTarball():
|
||||||
|
|
||||||
run(
|
run(
|
||||||
TAR_BZ2 % (newverdir + '.tar.bz2', newverdir),
|
TAR_BZ2 % (newverdir + '.tar.bz2', newverdir),
|
||||||
'tarball',
|
LOG_ALL,
|
||||||
'source tarball creation failed'
|
'source tarball creation failed'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -263,7 +277,7 @@ def BuildRelease():
|
||||||
|
|
||||||
run(
|
run(
|
||||||
scons_line + 'dist',
|
scons_line + 'dist',
|
||||||
'dist',
|
LOG_ALL,
|
||||||
'creation of distribution files failed'
|
'creation of distribution files failed'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -275,14 +289,14 @@ def CreateSpecialBuilds():
|
||||||
|
|
||||||
run(
|
run(
|
||||||
scons_line + 'PREFIX=%s\\%s %s install-compiler install-stubs' % (os.getcwd(), name, option),
|
scons_line + 'PREFIX=%s\\%s %s install-compiler install-stubs' % (os.getcwd(), name, option),
|
||||||
name,
|
LOG_ALL,
|
||||||
'creation of %s special build failed' % name
|
'creation of %s special build failed' % name
|
||||||
)
|
)
|
||||||
|
|
||||||
os.chdir(name)
|
os.chdir(name)
|
||||||
run(
|
run(
|
||||||
ZIP % ('..\\nsis-%s-%s.zip' % (VERSION, name), '*'),
|
ZIP % ('..\\nsis-%s-%s.zip' % (VERSION, name), '*'),
|
||||||
'%s.zip' % name,
|
LOG_ALL,
|
||||||
'copmression of %s special build failed' % name,
|
'copmression of %s special build failed' % name,
|
||||||
log_dir = '..'
|
log_dir = '..'
|
||||||
)
|
)
|
||||||
|
@ -344,7 +358,7 @@ def UpdateWiki(release_id):
|
||||||
def UpdateChangeLog():
|
def UpdateChangeLog():
|
||||||
run(
|
run(
|
||||||
'%s touch /home/groups/n/ns/nsis/bin/cl.timestamp' % RSH,
|
'%s touch /home/groups/n/ns/nsis/bin/cl.timestamp' % RSH,
|
||||||
'cl-timestamp',
|
LOG_ALL,
|
||||||
'change log start time modification failed'
|
'change log start time modification failed'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue