Skip to content
This repository
tag: v705
Fetching contributors…

Cannot retrieve contributors at this time

file 125 lines (90 sloc) 3.424 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
(*
Copyright © 2011 MLstate

This file is part of OPA.

OPA is free software: you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License, version 3, as published by
the Free Software Foundation.

OPA is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
more details.

You should have received a copy of the GNU Affero General Public License
along with OPA. If not, see <http://www.gnu.org/licenses/>.
*)

(**
Meta Infos about the build.

This module is meant to be generated at build time,
and should depends on nothing.
Any module in the framework can have access to it.

@author Mathieu Barbin
@author bld <bld.tool\@opageneral.com>
*)

(** {6 Non generated code} *)

(**
It is possible to define some part of code, which is not geneated by bld.
(like type definition, variant for version or whatever...)
*)


(** The rest of the module is generated by the build system *)

(** {6 Opa version name} *)

(**
The name of the opa version, e.g. S2, S3, S3.1, etc.
This version name is read from the file [version.txt], contained in the same
directory.
*)
val opa_version_name : string

(** {6 Git Infos} *)

(**
Git versions. An int indicated the number of commits since the beginning
of the repositories.

Generated from the following command line in each repository :

{[
git log --pretty=oneline | wc -l
]}
*)
(** *)

val opalang_git_version : int

(**
Git sha of HEAD. A string indicated the short sha of the last commit.

Generated from the following command line in each repository :

{[
git log -n1 --pretty=format:%h
]}
*)
(** *)
val opalang_git_sha : string

(** {6 Date} *)

(**
The date of the last commit.

Generated from the following command, in the main repository opageneral :

{[
git log -n1 --pretty=format:%ad --date=short
]}
*)
val date : string

(** Just the year of the build e.g. 2010 *)
val year : string

(** {6 Parameters} *)

(** A boolean which says if the build was a release *)
val is_release : bool

(** sum git version, make the sum between all git versions *)
val git_version_counter : int

(** From the different infos, we build a uniq version identifier *)
val version_id : string

(**
Check if the current version of the compiler is newer than a given string.

The purpose is to get quickly a clear error message about the version
of the compiler, rather than a strange error message caused by
an update in the compiler and/or in the stdlib.

It is recommended to use this option in your Makefile for applications
using new features, or new functions of the stdlib, or in any application
published somewhere, and potentially compiled by people having
wild and heterogeneous versions of Opa (nightly builds, from sources).

Support several formats:
-only the name, like "S3.5"
-simple int, in that case this will compare with the build id
HACK: for backward compatibility (reset of build number)
any number after 27000 is older than numbers between 0 and 27000.

If the function returns [None], that means that the given
string does not make sence as a version name.
*)
val assert_minimal_version : string -> bool option
Something went wrong with that request. Please try again.