Generate manpages; commit that; improve error output in sh_log.
This commit is contained in:
parent
785244020a
commit
c62edf9471
|
@ -31,14 +31,6 @@ Example:
|
|||
|
||||
$ ./zcutil/make-release.py v1.0.8-1 v1.0.9
|
||||
|
||||
Build by running `./zcutil/build.sh`.
|
||||
|
||||
Then perform the following command:
|
||||
|
||||
$ bash contrib/devtools/gen-manpages.sh
|
||||
|
||||
Commit the changes.
|
||||
|
||||
### B3. Generate release notes
|
||||
|
||||
Run the release-notes.py script to generate release notes and update authors.md file. For example:
|
||||
|
|
|
@ -42,16 +42,11 @@ def main_logged(release, releaseprev, releaseheight):
|
|||
initialize_git(release)
|
||||
patch_version_in_files(release, releaseprev)
|
||||
patch_release_height(releaseheight)
|
||||
|
||||
logging.info('Committing version changes.')
|
||||
sh_log(
|
||||
'git',
|
||||
'commit',
|
||||
'--all',
|
||||
'-m', 'make-release.py versioning changes.',
|
||||
)
|
||||
commit('Versioning changes.')
|
||||
|
||||
build()
|
||||
gen_manpages()
|
||||
commit('Updated manpages.')
|
||||
raise NotImplementedError(main_logged)
|
||||
|
||||
|
||||
|
@ -158,7 +153,18 @@ def build():
|
|||
sh_log('./zcutil/build.sh', '-j', nproc)
|
||||
|
||||
|
||||
def gen_manpages():
|
||||
logging.info('Generating manpages.')
|
||||
sh_log('./contrib/devtools/gen-manpages.sh')
|
||||
|
||||
|
||||
# Helper code:
|
||||
def commit(message):
|
||||
logging.info('Committing: %r', message)
|
||||
fullmsg = 'make-release.py: {}'.format(message)
|
||||
sh_log('git', 'commit', '--all', '-m', fullmsg)
|
||||
|
||||
|
||||
def chdir_to_repo(repo):
|
||||
if repo is None:
|
||||
dn = os.path.dirname
|
||||
|
@ -258,9 +264,14 @@ def sh_out(*args):
|
|||
|
||||
|
||||
def sh_log(*args):
|
||||
logging.debug('Run (log): %r', args)
|
||||
p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
logging.debug('PID: %r', p.pid)
|
||||
PIPE = subprocess.PIPE
|
||||
try:
|
||||
p = subprocess.Popen(args, stdout=PIPE, stderr=PIPE)
|
||||
except OSError:
|
||||
logging.error('Error launching %r...', args)
|
||||
raise
|
||||
|
||||
logging.debug('Run (log PID %r): %r', p.pid, args)
|
||||
for line in p.stdout:
|
||||
logging.debug('> %s', line.rstrip())
|
||||
status = p.wait()
|
||||
|
|
Loading…
Reference in New Issue