Monorepo management for opam overlays
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(monopam): skip pushing mono repo when pushing specific packages

`monopam push <x>` now only pushes the package checkout and opam-repo
upstream, not the mono repo itself. The mono repo is only pushed when
running `monopam push` without specific packages.

+9 -7
+9 -7
lib/push.ml
··· 132 132 | None -> true 133 133 | Some remote_head -> not (Git.Hash.equal local_head remote_head)) 134 134 135 - let workspace_repos ~proc ~fs ~config ~force = 135 + let workspace_repos ~proc ~fs ~config ~force ~push_mono = 136 136 let push_repo name path = 137 137 if Git.Repository.is_repo ~fs path then begin 138 138 let repo = Git.Repository.open_repo ~fs path in ··· 159 159 in 160 160 let mono = Config.Paths.monorepo config in 161 161 let opam_repo = Config.Paths.opam_repo config in 162 - push_repo "mono" mono; 162 + if push_mono then push_repo "mono" mono; 163 163 push_repo "opam-repo" opam_repo 164 164 165 165 (** {1 Main Push Operation} *) ··· 349 349 mono 350 350 end 351 351 352 - let export_and_push ~proc ~fs ~fs_t ~config ~sources ~upstream ~clean ~force 353 - repos = 352 + let export_and_push ~proc ~fs ~fs_t ~config ~sources ~upstream ~push_mono ~clean 353 + ~force repos = 354 354 let n_repos = List.length repos in 355 355 let total = if upstream then n_repos * 2 else n_repos in 356 356 let progress = Tty.Progress.create ~total "Push" in ··· 367 367 match log_push_results push_results with 368 368 | Error e -> Error e 369 369 | Ok () -> 370 - if upstream then workspace_repos ~proc ~fs:fs_t ~config ~force; 370 + if upstream then 371 + workspace_repos ~proc ~fs:fs_t ~config ~force ~push_mono; 371 372 Ok ()) 372 373 373 374 let load_sources ~fs ~config = ··· 421 422 Ok () 422 423 end 423 424 else 424 - export_and_push ~proc ~fs ~fs_t ~config ~sources ~upstream ~clean 425 - ~force to_push 425 + let push_mono = packages = [] in 426 + export_and_push ~proc ~fs ~fs_t ~config ~sources ~upstream 427 + ~push_mono ~clean ~force to_push 426 428 end 427 429 end