@@ -51,20 +51,20 @@ let publish_doc ~specific ~dry_run ~yes pkg_names pkg =
5151 Ok ()
5252 | Ok _ -> publish_doc ~dry_run ~yes pkg_names pkg
5353
54- let publish_distrib ?token ~dry_run ~yes ~draft pkg =
54+ let publish_distrib ?token ~dry_run ~yes ~draft ? dev_repo pkg =
5555 App_log. status (fun l -> l " Publishing distribution" );
5656 Pkg. distrib_file ~dry_run pkg >> = fun archive ->
5757 Pkg. publish_msg pkg >> = fun msg ->
5858 App_log. status (fun l -> l " Publishing to github" );
5959 Config. token ~token ~dry_run () >> = fun token ->
60- Github. publish_distrib ~token ~dry_run ~yes ~msg ~archive ~draft pkg
60+ Github. publish_distrib ~token ~dry_run ~yes ~msg ~archive ~draft ?dev_repo pkg
6161 >> = fun url ->
6262 Pkg. archive_url_path pkg >> = fun url_file ->
6363 Sos. write_file ~dry_run url_file url >> = fun () -> Ok ()
6464
6565let publish ?build_dir ?opam ?change_log ?distrib_file ?publish_msg ?token
66- ~pkg_names ~version ~tag ~keep_v ~dry_run ~publish_artefacts ~yes ~ draft ()
67- =
66+ ? dev_repo ~pkg_names ~version ~tag ~keep_v ~dry_run ~publish_artefacts ~yes
67+ ~ draft () =
6868 let specific_doc =
6969 List. exists (function `Doc -> true | _ -> false ) publish_artefacts
7070 in
@@ -80,7 +80,7 @@ let publish ?build_dir ?opam ?change_log ?distrib_file ?publish_msg ?token
8080 acc >> = fun () ->
8181 match artefact with
8282 | `Doc -> publish_doc ~specific: specific_doc ~dry_run ~yes pkg_names pkg
83- | `Distrib -> publish_distrib ?token ~dry_run ~yes ~draft pkg
83+ | `Distrib -> publish_distrib ?token ~dry_run ~yes ~draft ?dev_repo pkg
8484 in
8585 List. fold_left publish_artefact (Ok () ) publish_artefacts >> = fun () -> Ok 0
8686
@@ -89,9 +89,10 @@ let publish_cli () (`Build_dir build_dir) (`Package_names pkg_names)
8989 (`Dist_opam opam ) (`Change_log change_log ) (`Dist_file distrib_file )
9090 (`Publish_msg publish_msg ) (`Dry_run dry_run )
9191 (`Publish_artefacts publish_artefacts ) (`Yes yes ) (`Token token )
92- (`Draft draft ) =
92+ (`Draft draft ) (`Dev_repo dev_repo ) =
9393 publish ?build_dir ?opam ?change_log ?distrib_file ?publish_msg ?token
94- ~pkg_names ~version ~tag ~keep_v ~dry_run ~publish_artefacts ~yes ~draft ()
94+ ~pkg_names ~version ~tag ~keep_v ~dry_run ~publish_artefacts ~yes ~draft
95+ ?dev_repo ()
9596 |> Cli. handle_error
9697
9798(* Command line interface *)
@@ -149,7 +150,7 @@ let term =
149150 const publish_cli $ Cli. setup $ Cli. build_dir $ Cli. pkg_names
150151 $ Cli. pkg_version $ Cli. dist_tag $ Cli. keep_v $ Cli. dist_opam
151152 $ Cli. change_log $ Cli. dist_file $ Cli. publish_msg $ Cli. dry_run $ artefacts
152- $ Cli. yes $ Cli. token $ Cli. draft)
153+ $ Cli. yes $ Cli. token $ Cli. draft $ Cli. dev_repo )
153154
154155let info = Cmd. info " publish" ~doc ~sdocs ~exits ~man ~man_xrefs
155156let cmd = Cmd. v info term
0 commit comments