Print the manual steps that remain after preparation. Args: version: Release version without the leading `v`. branch: Release branch name. changelog_path: Changelog file created for this release. args: Parsed CLI arguments.
(
version: str,
branch: str,
changelog_path: Path,
args: argparse.Namespace,
)
| 345 | |
| 346 | |
| 347 | def print_next_steps( |
| 348 | version: str, |
| 349 | branch: str, |
| 350 | changelog_path: Path, |
| 351 | args: argparse.Namespace, |
| 352 | ) -> None: |
| 353 | """Print the manual steps that remain after preparation. |
| 354 | |
| 355 | Args: |
| 356 | version: Release version without the leading `v`. |
| 357 | branch: Release branch name. |
| 358 | changelog_path: Changelog file created for this release. |
| 359 | args: Parsed CLI arguments. |
| 360 | """ |
| 361 | changelog_rel = changelog_path.relative_to(REPO_ROOT) |
| 362 | print("\nRelease preparation complete.") |
| 363 | print(f"Branch: {branch}") |
| 364 | print(f"Changelog: {changelog_rel}") |
| 365 | |
| 366 | if args.commit: |
| 367 | if not args.push: |
| 368 | print(f"Next: git push -u {args.remote} {branch}") |
| 369 | else: |
| 370 | print("Next:") |
| 371 | print(f"1. Review and polish {changelog_rel}") |
| 372 | print(f"2. git add pyproject.toml astrbot/__init__.py {changelog_rel}") |
| 373 | print(f'3. git commit -m "chore: bump version to {version}"') |
| 374 | print(f"4. git push -u {args.remote} {branch}") |
| 375 | |
| 376 | print(f"Open a PR from {branch} to {args.base_branch}.") |
| 377 | print( |
| 378 | "After the PR is merged, tag from the updated base branch with " |
| 379 | f"`git tag v{version}` and `git push {args.remote} v{version}`." |
| 380 | ) |
| 381 | |
| 382 | |
| 383 | def parse_args(argv: list[str]) -> argparse.Namespace: |