Skip to content

Commit e81e029

Browse files
committed
version info generation of diffast-api fixed
1 parent bf97570 commit e81e029

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

dune-project

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
(using menhir 3.0)
55

66
(name diffast)
7+
(version 0.1.1)
78

89
(generate_opam_files true)
910
(opam_file_location inside_opam_directory)

src/api/dune

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
(rule
1313
(target v)
1414
(action
15-
(with-stdout-to %{target} (run git describe --always --dirty))
15+
(with-accepted-exit-codes (or 0 128)
16+
(with-stdout-to %{target} (run git describe --always --dirty))
17+
)
1618
)
1719
)
1820
)
@@ -25,10 +27,16 @@
2527

2628
(rule
2729
(target v)
28-
(enabled_if (= %{read:pkg/v} ""))
30+
(enabled_if (and (= %{read:pkg/v} "") (<> %{read:dev/v} "")))
2931
(action (write-file %{target} %{read-lines:dev/v}))
3032
)
3133

34+
(rule
35+
(target v)
36+
(enabled_if (and (= %{read:pkg/v} "") (= %{read:dev/v} "")))
37+
(action (write-file %{target} "unknown"))
38+
)
39+
3240
(rule
3341
(target version.ml)
3442
(action

0 commit comments

Comments
 (0)