File: dune

package info (click to toggle)
js-of-ocaml 4.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 7,372 kB
  • sloc: ml: 70,468; javascript: 8,238; ansic: 319; makefile: 217; lisp: 23; sh: 6; perl: 4
file content (20 lines) | stat: -rw-r--r-- 358 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
(* -*- tuareg -*- *)
open StdLabels
open Jbuild_plugin.V1

let git_version =
  match run_and_read_lines "git describe --always --dirty" with
  | exception _ -> ""
  | version :: _ -> version
  | [] -> ""

let dyn =
  Printf.sprintf
    {|
(rule
  (target GIT-VERSION)
  (action (with-stdout-to %%{target} (echo "%s"))))
|}
    git_version

let () = send dyn