Improve script output formatting

This commit is contained in:
Joe Rickerby
2020-08-31 18:59:32 +01:00
parent 84446ed1a9
commit 8e0ee0a4ab
+11 -11
View File
@@ -54,7 +54,7 @@ services = [
name='github',
src_config_path='examples/github-minimal.yml',
dst_config_path='.github/workflows/example.yml',
badge_md='![Build](https://github.com/joerick/cibuildwheel/workflows/Build/badge.svg?branch={branch})',
badge_md='[![Build](https://github.com/joerick/cibuildwheel/workflows/Build/badge.svg?branch={branch})](https://github.com/joerick/cibuildwheel/actions)',
),
CIService(
name='travis-ci',
@@ -96,7 +96,7 @@ def run_example_ci_configs():
run(['git', 'add', example_project], check=True)
run(['git', 'commit', '-m', textwrap.dedent(f'''
Test example minimal configs.
Test example minimal configs
Testing files: {[s.src_config_path for s in services]}
Generated from branch: {previous_branch}
@@ -106,17 +106,17 @@ def run_example_ci_configs():
print('---')
print()
print('**Examples test run**')
print()
print(f'Branch: [{branch_name}](https://github.com/joerick/cibuildwheel/tree/{branch_name})')
print()
print('| Service | Config | Status |')
print('|---|---|---|')
print('> **Examples test run**')
print('> ')
print(f'> Branch: [{branch_name}](https://github.com/joerick/cibuildwheel/tree/{branch_name})')
print('> ')
print('> | Service | Config | Status |')
print('> |---|---|---|')
for service in services:
badge = service.badge_md.format(branch=branch_name, branch_escaped=quote(branch_name, safe=''))
print(f'| {service.name} | {service.src_config_path} | {badge} |')
print()
print('Generated by `bin/run_example_ci_config.py`')
print(f'> | {service.name} | `{service.src_config_path}` | {badge} |')
print('> ')
print('> Generated by `bin/run_example_ci_config.py`')
print()
print('---')
finally: