Skip to content
Snippets Groups Projects
Commit 92b235d5 authored by Patrick Baudin's avatar Patrick Baudin
Browse files

[lint] fixes version management

parent 8afe8813
No related branches found
No related tags found
No related merge requests found
......@@ -79,5 +79,5 @@ That means there is an implicit overloadable JSON description:
The option `-c <json-confi g-file>` allows to extend and/or overload the default configuration.
When the `available_cmd` field is set to an empty string, that disable the check/update with the related tool.
An empty string can also be set to the field `check_cmd` (resp. `update_cmd`) when the related tool does not offer check (resp. update) command.
When the `available_cmd` is set to and empty string, the tool is considered available except if the fields `check_cmd` `update_cmd` are both set to an empty string.
......@@ -20,10 +20,17 @@
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; automatic versionning from opam file
(rule
(targets version.ml)
(deps frama-c-lint.opam)
(action (system "grep ^version frama-c-lint.opam | sed -e 's/version:/let version=/' > version.ml"))
)
(executable
(public_name frama-c-lint)
(name lint)
(modules lint UTF8)
(modules lint version UTF8)
(preprocess (pps ppx_deriving_yojson))
(libraries unix yojson ocp-indent.lexer ocp-indent.lib ocp-indent.dynlink)
)
......@@ -10,6 +10,7 @@ C files, UTF8 for all text files, newline at EOF, no trailing whitespaces.
maintainer: "allan.blanchard@cea.fr"
authors: [
"Allan Blanchard"
"Patrick Baudin"
]
homepage: "https://frama-c.com/"
license: "LGPL-2.1-only"
......
......@@ -430,10 +430,8 @@ let check ~verbose ~update file params =
let exec_name = Sys.argv.(0)
let version = "1.0"
let version () =
Format.printf "%s version %s@." (Filename.basename exec_name) version;
Format.printf "%s version %s@." (Filename.basename exec_name) Version.version;
exit 0
let update = ref false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment