diff --git a/doc/release-process.md b/doc/release-process.md index b43540ce3..bcbab4946 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -40,6 +40,16 @@ process. If these were not anticipated correctly, this could block the release, so if you suspect this is necessary, double check with the whole engineering team. +## Release dependencies + +The release script has the following dependencies: + +- `help2man` +- `debchange` (part of the devscripts Debian package) + +You can optionally install the `progressbar2` Python module with pip to have a +progress bar displayed during the build process. + ## Release process In the commands below, and are prefixed with a v, ie. diff --git a/zcutil/make-release.py b/zcutil/make-release.py index 991fde051..7d505c279 100755 --- a/zcutil/make-release.py +++ b/zcutil/make-release.py @@ -209,8 +209,27 @@ def patch_release_height(releaseheight): @phase('Building...') def build(): + base_dir = os.getcwd() + depends_dir = os.path.join(base_dir, 'depends') + src_dir = os.path.join(base_dir, 'src') nproc = sh_out('nproc').strip() - sh_log('./zcutil/build.sh', '-j', nproc) + sh_progress([ + 'Staging boost...', + 'Staging libevent...', + 'Staging zeromq...', + 'Staging libgmp...', + 'Staging libsodium...', + "Leaving directory '%s'" % depends_dir, + 'config.status: creating libzcashconsensus.pc', + "Entering directory '%s'" % src_dir, + 'httpserver.cpp', + 'torcontrol.cpp', + 'gtest/test_tautology.cpp', + 'gtest/test_metrics.cpp', + 'test/equihash_tests.cpp', + 'test/util_tests.cpp', + "Leaving directory '%s'" % src_dir, + ], './zcutil/build.sh', '-j', nproc) @phase('Generating manpages.') @@ -348,8 +367,9 @@ def sh_out(*args): def sh_log(*args): PIPE = subprocess.PIPE + STDOUT = subprocess.STDOUT try: - p = subprocess.Popen(args, stdout=PIPE, stderr=PIPE, stdin=None) + p = subprocess.Popen(args, stdout=PIPE, stderr=STDOUT, stdin=None) except OSError: logging.error('Error launching %r...', args) raise @@ -362,6 +382,38 @@ def sh_log(*args): raise SystemExit('Nonzero exit status: {!r}'.format(status)) +def sh_progress(markers, *args): + try: + import progressbar + except: + sh_log(*args) + return + + PIPE = subprocess.PIPE + STDOUT = subprocess.STDOUT + try: + p = subprocess.Popen(args, stdout=PIPE, stderr=STDOUT, stdin=None) + except OSError: + logging.error('Error launching %r...', args) + raise + + pbar = progressbar.ProgressBar(max_value=len(markers)) + marker = 0 + pbar.update(marker) + logging.debug('Run (log PID %r): %r', p.pid, args) + for line in p.stdout: + logging.debug('> %s', line.rstrip()) + for idx, val in enumerate(markers[marker:]): + if val in line: + marker += idx + 1 + pbar.update(marker) + break + pbar.finish() + status = p.wait() + if status != 0: + raise SystemExit('Nonzero exit status: {!r}'.format(status)) + + class Version (object): '''A release version.'''