Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions metta/setup/tools/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,21 +257,20 @@ def _post_to_discord(


def _push_git_history_to_child_repo(*, package: str, dry_run: bool) -> None:
dry_run_prefix = "[DRY RUN] " if dry_run else ""
info(f"{dry_run_prefix}Pushing filtered git history for {package} to child repo...")

cmd = [f"{get_repo_root()}/devops/git/push_child_repo.py", package, "-y"]
if dry_run:
info(f"Would push filtered git history for {package} to child repo.")
return
cmd.append("--dry-run")

info(f"Pushing filtered git history for {package} to child repo...")
try:
subprocess.run(
[f"{get_repo_root()}/devops/git/push_child_repo.py", package, "-y"],
check=True,
)
subprocess.run(cmd, check=True)
except subprocess.CalledProcessError as exc:
error(f"Failed to push to child repo: {exc}")
raise typer.Exit(exc.returncode) from exc
else:
success(f"Pushed filtered git history for {package} to child repo.")
success(f"{dry_run_prefix}Pushed filtered git history for {package} to child repo.")


def _publish(
Expand Down
Loading