package dune-release

  1. Overview
  2. Docs
Release dune packages in opam

Install

Dune Dependency

Authors

Maintainers

Sources

dune-release-1.6.0.tbz
sha256=0e1b70588290015fd15f94f777ae6e48f32a0b9201fe1af71ae3d4c687ca591e
sha512=d8a2e1db19e50f0e8e6876c2006cca370de0d5f0b2e4566888e3eb52afab75087ab6f37762e9ebf783d3dcdcd9dfd7eae34fe5fd749402be84f330de20665db3

doc/src/dune-release/opam_file.ml.html

Source file opam_file.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
let upgrade ~filename ~url ~id ~version opam_t =
  let commit_hash =
    {
      OpamParserTypes.FullPos.pelem = OpamParserTypes.FullPos.String id;
      pos = OpamTypesBase.pos_file filename;
    }
  in
  match version with
  | `V1 descr ->
      opam_t |> OpamFormatUpgrade.opam_file_from_1_2_to_2_0
      |> OpamFile.OPAM.with_url url
      |> OpamFile.OPAM.with_descr descr
      |> OpamFile.OPAM.with_version_opt None
      |> OpamFile.OPAM.with_name_opt None
      |> fun x -> OpamFile.OPAM.add_extension x "x-commit-hash" commit_hash
  | `V2 ->
      opam_t |> OpamFile.OPAM.with_url url
      |> OpamFile.OPAM.with_version_opt None
      |> OpamFile.OPAM.with_name_opt None
      |> fun x -> OpamFile.OPAM.add_extension x "x-commit-hash" commit_hash
OCaml

Innovation. Community. Security.