diff options
author | Florian Bruhin <me@the-compiler.org> | 2021-01-27 11:10:41 +0100 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2021-01-27 11:12:26 +0100 |
commit | 13feaa883c94cdf60ac7e6f27b033f1add18284e (patch) | |
tree | f891ee329cd99b773ca589dc7776f55478fe4ed1 | |
parent | db56efa7b79d5ada7ea61ec933a083232e37b4d6 (diff) | |
download | qutebrowser-13feaa883c94cdf60ac7e6f27b033f1add18284e.tar.gz qutebrowser-13feaa883c94cdf60ac7e6f27b033f1add18284e.zip |
scripts: Show raw diff on CI when recompiling requirements
-rw-r--r-- | scripts/dev/recompile_requirements.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/scripts/dev/recompile_requirements.py b/scripts/dev/recompile_requirements.py index 239a0fa75..4112cd474 100644 --- a/scripts/dev/recompile_requirements.py +++ b/scripts/dev/recompile_requirements.py @@ -385,10 +385,9 @@ def parse_versioned_line(line): return name, version -def _get_changes(): +def _get_changes(diff): """Get a list of changed versions from git.""" changes_dict = {} - diff = git_diff() for line in diff: if not line.startswith('-') and not line.startswith('+'): continue @@ -410,18 +409,22 @@ def _get_changes(): def print_changed_files(): """Output all changed files from this run.""" + diff = git_diff() + if utils.ON_CI: + with utils.gha_group('Raw diff'): + print('\n'.join(diff)) + changed_files = _get_changed_files() files_text = '\n'.join('- ' + line for line in changed_files) - changes = _get_changes() - diff_text = '\n'.join(str(change) for change in changes) + changes = _get_changes(diff) + changes_text = '\n'.join(str(change) for change in changes) - utils.print_title('Changed') utils.print_subtitle('Files') print(files_text) print() - utils.print_subtitle('Diff') - print(diff_text) + utils.print_subtitle('Changes') + print(changes_text) if utils.ON_CI: print() @@ -555,6 +558,7 @@ def main(): else: test_tox() + utils.print_title('Changed') print_changed_files() |