Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

- Bump the `ocamlformat` dev dependency to 0.28.1 so that the contributor setup
documented in `CONTRIBUTING.md` can be installed again. (#520, @alexleighton)
- `dune-release publish` now respects the `--dev-repo` or `DUNE_RELEASE_DEV_REPO`
CLI inputs. (#522, @shonfeder)

## 2.2.0

Expand Down
18 changes: 13 additions & 5 deletions lib/github.ml
Original file line number Diff line number Diff line change
Expand Up @@ -312,20 +312,28 @@ let create_release ~dry_run ~yes ~dev_repo ~token ~msg ~tag ~version ~user ~repo
App_log.status (fun l -> l "Release with id %d already exists" id);
Ok id

let repo_info ~dev_repo pkg =
match dev_repo with
| None ->
pkg_dev_repo pkg >>= fun dev_url ->
Pkg.infer_github_repo pkg >>| fun repo -> (dev_url, repo)
| Some dev_url -> (
match Github_repo.from_uri dev_url with
| None ->
R.error_msgf "the supplied dev-repo %s is not a valid repo URI"
dev_url
| Some repo -> Ok (dev_url, repo))

let publish_distrib ~token ?dev_repo ~dry_run ~msg ~archive ~yes ~draft
~prerelease p =
Pkg.infer_github_repo p >>= fun { owner; repo } ->
Pkg.tag p >>= fun tag ->
assert_tag_exists ~dry_run tag >>= fun () ->
Vcs.get () >>= fun vcs ->
check_tag ~dry_run vcs tag >>= fun () ->
let dev_repo =
match dev_repo with Some d -> Ok d | None -> pkg_dev_repo p
in
dev_repo >>= fun dev_repo ->
Pkg.build_dir p >>= fun build_dir ->
Pkg.name p >>= fun name ->
Pkg.version p >>= fun version ->
repo_info ~dev_repo p >>= fun (dev_repo, { owner; repo }) ->
push_tag ~dry_run ~yes ~dev_repo vcs tag >>= fun () ->
create_release ~dry_run ~yes ~dev_repo ~token ~version ~msg ~tag ~user:owner
~repo ~draft ~prerelease
Expand Down
Loading