package mybuild

  1. Overview
  2. Docs
Small library and utility to generate version from VCS (git)

Install

Dune Dependency

Authors

Maintainers

Sources

mybuild-7.tbz
sha256=3ddc587181ab66d455afb96923a512870bb5b531d2664358a660720190e64037
sha512=266db5e98eb8dd701567fb47d6d2b410527d3cfdf7bd3661beddbefe730d7e87ace5d3a6302674d2ec1339a7b78e66586bd6aeba88df79767d40d6c1b402aecd

Description

Tags

org:ygrek

Published: 12 Jun 2024

README

Mybuild

Small library to generate OCaml file with the project version extracted from git + command-line utility to do the same.

How to use

Add the file gen_version.ml in your project:

let () = Mybuild.Version.save Sys.argv.(1)

Add the following rules in dune:

(executable (name gen_version) (libraries mybuild) (modules gen_version))

(rule (target version.ml) (deps (universe)) (action (run ./gen_version.exe %{target})))

Then use Version.id in your program as needed.

Dependencies (3)

  1. base-unix
  2. dune >= "2.0"
  3. ocaml >= "4.03.0"

Dev Dependencies

None

Used by (3)

  1. elasticsearch-cli
  2. esgg
  3. sqlgg >= "20200521"

Conflicts

None

OCaml

Innovation. Community. Security.