Improve script output formatting
This commit is contained in:
@@ -54,7 +54,7 @@ services = [
|
|||||||
name='github',
|
name='github',
|
||||||
src_config_path='examples/github-minimal.yml',
|
src_config_path='examples/github-minimal.yml',
|
||||||
dst_config_path='.github/workflows/example.yml',
|
dst_config_path='.github/workflows/example.yml',
|
||||||
badge_md='',
|
badge_md='[](https://github.com/joerick/cibuildwheel/actions)',
|
||||||
),
|
),
|
||||||
CIService(
|
CIService(
|
||||||
name='travis-ci',
|
name='travis-ci',
|
||||||
@@ -96,7 +96,7 @@ def run_example_ci_configs():
|
|||||||
|
|
||||||
run(['git', 'add', example_project], check=True)
|
run(['git', 'add', example_project], check=True)
|
||||||
run(['git', 'commit', '-m', textwrap.dedent(f'''
|
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]}
|
Testing files: {[s.src_config_path for s in services]}
|
||||||
Generated from branch: {previous_branch}
|
Generated from branch: {previous_branch}
|
||||||
@@ -106,17 +106,17 @@ def run_example_ci_configs():
|
|||||||
|
|
||||||
print('---')
|
print('---')
|
||||||
print()
|
print()
|
||||||
print('**Examples test run**')
|
print('> **Examples test run**')
|
||||||
print()
|
print('> ')
|
||||||
print(f'Branch: [{branch_name}](https://github.com/joerick/cibuildwheel/tree/{branch_name})')
|
print(f'> Branch: [{branch_name}](https://github.com/joerick/cibuildwheel/tree/{branch_name})')
|
||||||
print()
|
print('> ')
|
||||||
print('| Service | Config | Status |')
|
print('> | Service | Config | Status |')
|
||||||
print('|---|---|---|')
|
print('> |---|---|---|')
|
||||||
for service in services:
|
for service in services:
|
||||||
badge = service.badge_md.format(branch=branch_name, branch_escaped=quote(branch_name, safe=''))
|
badge = service.badge_md.format(branch=branch_name, branch_escaped=quote(branch_name, safe=''))
|
||||||
print(f'| {service.name} | {service.src_config_path} | {badge} |')
|
print(f'> | {service.name} | `{service.src_config_path}` | {badge} |')
|
||||||
print()
|
print('> ')
|
||||||
print('Generated by `bin/run_example_ci_config.py`')
|
print('> Generated by `bin/run_example_ci_config.py`')
|
||||||
print()
|
print()
|
||||||
print('---')
|
print('---')
|
||||||
finally:
|
finally:
|
||||||
|
|||||||
Reference in New Issue
Block a user