|
3 | 3 | import nox |
4 | 4 |
|
5 | 5 | @nox.session(venv_backend='none') |
6 | | -def bump_major(session): |
7 | | - session.run('python', 'utils/bump.py', '--major', *session.posargs) |
| 6 | +def bump_patch(session) : session.run('python', 'utils/bump.py', '--patch', *session.posargs) |
8 | 7 |
|
9 | 8 | @nox.session(venv_backend='none') |
10 | | -def bump_minor(session): |
11 | | - session.run('python', 'utils/bump.py', '--minor', *session.posargs) |
| 9 | +def bump_minor(session) : session.run('python', 'utils/bump.py', '--minor', *session.posargs) |
12 | 10 |
|
13 | 11 | @nox.session(venv_backend='none') |
14 | | -def bump_patch(session): |
15 | | - session.run('python', 'utils/bump.py', '--patch', *session.posargs) |
| 12 | +def bump_major(session) : session.run('python', 'utils/bump.py', '--major', *session.posargs) |
16 | 13 |
|
17 | 14 | @nox.session(venv_backend='none') |
18 | | -def build(session): |
19 | | - clean(session) |
20 | | - session.run('python', '-m', 'build') |
21 | | - print('Build complete!') |
| 15 | +def build(session) : clean(session) ; session.run('python', '-m', 'build') ; print('Build complete!') |
| 16 | + |
| 17 | +@nox.session(venv_backend='none') |
| 18 | +def publish(session) : session.run('bash', 'utils/publish.sh', *session.posargs) |
| 19 | + |
| 20 | +@nox.session(venv_backend='none') |
| 21 | +def release_patch(session) : bump_patch(session) ; build(session) ; publish(session) |
| 22 | + |
| 23 | +@nox.session(venv_backend='none') |
| 24 | +def release_minor(session) : bump_minor(session) ; build(session) ; publish(session) |
| 25 | + |
| 26 | +@nox.session(venv_backend='none') |
| 27 | +def release_major(session) : bump_major(session) ; build(session) ; publish(session) |
22 | 28 |
|
23 | 29 | @nox.session(venv_backend='none') |
24 | 30 | def clean(session): |
25 | 31 | paths_to_remove = ['dist', 'build'] |
26 | 32 | for path in paths_to_remove: |
27 | | - if Path(path).exists(): |
28 | | - shutil.rmtree(path) |
29 | | - print(f'Removed {path}/') |
| 33 | + if Path(path).exists() : shutil.rmtree(path) ; print(f'Removed {path}/') |
30 | 34 | for item in Path('.').glob('*.egg-info'): |
31 | | - if item.is_dir(): |
32 | | - shutil.rmtree(item) |
33 | | - print(f'Removed {item}/') |
| 35 | + if item.is_dir() : shutil.rmtree(item) ; print(f'Removed {item}/') |
34 | 36 | print('Clean complete!') |
0 commit comments