forked from ocaml-ppx/ocamlformat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This uses dune-build-info to compute the version number. It will be resolved in the following way: - if (version) is set in (dune-project), it is used. This is what happens when using opam pins (through dune subst), or for released versions (through dune-release). - otherwise, a description from [git describe] will be used. Caveat for this case: binaries under [_build/] will not have this information, but [dune install --prefix _install] will copy a valid binary under [_install/bin]. We require at least dune 2.7, since `dune-build-info` is broken on flambda switches before this version. See ocaml/dune#3599
- Loading branch information
Showing
6 changed files
with
41 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
(**************************************************************************) | ||
(* *) | ||
(* OCamlFormat *) | ||
(* *) | ||
(* Copyright (c) Facebook, Inc. and its affiliates. *) | ||
(* *) | ||
(* This source code is licensed under the MIT license found in *) | ||
(* the LICENSE file in the root directory of this source tree. *) | ||
(* *) | ||
(**************************************************************************) | ||
|
||
let version = | ||
let open Build_info.V1 in | ||
version () |> Option.value_map ~f:Version.to_string ~default:"unknown" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(**************************************************************************) | ||
(* *) | ||
(* OCamlFormat *) | ||
(* *) | ||
(* Copyright (c) Facebook, Inc. and its affiliates. *) | ||
(* *) | ||
(* This source code is licensed under the MIT license found in *) | ||
(* the LICENSE file in the root directory of this source tree. *) | ||
(* *) | ||
(**************************************************************************) | ||
|
||
val version : string | ||
(** A version number, or "unknown". This is provided by [dune-build-info], | ||
which means that it will be resolved in the following way: | ||
- if (version) is set in (dune-project), it is used. This is what happens | ||
when using opam pins (through dune subst), or for released versions | ||
(through dune-release). | ||
- otherwise, a description from [git describe] will be used. Caveat for | ||
this case: binaries under [_build/] will not have this information, but | ||
[dune install --prefix _install] will copy a valid binary under | ||
[_install/bin]. *) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.