(library
  (name cli)
  (libraries
    simple-utils
    cmdliner
    ligo
  )
  (modules cli cli_helpers version)
  (preprocess
    (pps ppx_let ppx_blob bisect_ppx --conditional)
  )
  (preprocessor_deps (file ../../CHANGELOG.md))
  (flags (:standard -open Simple_utils))
)

(rule
 (targets version.ml)
 (action (with-stdout-to
          version.ml
          (run "sh" "-c"
               "printf 'let version = \"Rolling Release\nCommit SHA1: %s\nCommit Date: %s\"' \"${CI_COMMIT_SHA}\" \"${COMMIT_DATE}\""))))

(executable
  (name runligo)
  (public_name ligo)
  (libraries
    simple-utils
    cmdliner
    ligo
    cli
  )
  (modules runligo)
  (package ligo)
  (preprocess
    (pps ppx_let ppx_blob bisect_ppx --conditional)
  )
  (flags (:standard -open Simple_utils))
)
