Skip to content

Commit

Permalink
Use version from dune build info
Browse files Browse the repository at this point in the history
  • Loading branch information
dmtrKovalenko committed Aug 25, 2024
1 parent b484930 commit 1bed694
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion bin/ODiffBin.ml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ let cmd =
$ diffColor $ parsableOutput $ antialiasing $ ignoreRegions $ diffLines
$ disableGcOptimizations

let version =
match Build_info.V1.version () with
| None -> "dev"
| Some v -> Build_info.V1.Version.to_string v

let info =
let man =
[
Expand All @@ -86,7 +91,7 @@ let info =
`P "Supported image types: .png, .jpg, .jpeg, .tiff";
]
in
Cmd.info "odiff" ~version:"3.0.1" ~doc:"Find difference between 2 images."
Cmd.info "odiff" ~version ~doc:"Find difference between 2 images."
~exits:
[
Cmd.Exit.info 0 ~doc:"on image match";
Expand Down
2 changes: 1 addition & 1 deletion bin/dune
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
(package odiff)
(flags
(:standard -w -27))
(libraries odiff-core odiff-io cmdliner))
(libraries odiff-core odiff-io cmdliner dune-build-info))

(env
(dev
Expand Down
1 change: 1 addition & 0 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

(package
(name odiff)
(version 3.1.0)
(synopsis "CLI for comparing images pixel-by-pixel")
(depends
odiff-core
Expand Down
1 change: 1 addition & 0 deletions odiff.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
version: "3.1.0"
synopsis: "CLI for comparing images pixel-by-pixel"
maintainer: ["https://dmtrkovalenko.dev" "[email protected]"]
authors: ["Dmitriy Kovalenko"]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "odiff-bin",
"version": "3.0.1",
"version": "3.1.0",
"author": "Dmitriy Kovalenko <[email protected]>",
"license": "MIT",
"description": "The fastest image difference tool in the world",
Expand Down

0 comments on commit 1bed694

Please sign in to comment.