File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 85
85
(target configVersion.ml)
86
86
(mode (promote (until-clean) (only configVersion.ml))) ; replace existing file in source tree, even if releasing (only overrides)
87
87
(deps (universe)) ; do not cache, always regenerate
88
- (action (pipe-stdout (run git describe --all --long --dirty) (with-stdout-to %{target} (bash "xargs printf '(* Automatically regenerated, changes do not persist! *)\nlet version = \"%s\"'")))))
88
+ (action (pipe-stdout (bash " git describe --all --long --dirty || echo \"n/a\"" ) (with-stdout-to %{target} (bash "xargs printf '(* Automatically regenerated, changes do not persist! *)\nlet version = \"%s\"'")))))
89
89
90
90
(rule
91
91
(target configProfile.ml)
Original file line number Diff line number Diff line change 1
1
let release = " %%VERSION_NUM%%"
2
+ let release_commit = " %%VCS_COMMIT_ID%%"
2
3
3
4
let goblint =
4
5
let commit = ConfigVersion. version in
5
6
if BatString. starts_with release " %" then
6
7
commit
7
- else
8
+ else (
9
+ let commit =
10
+ if commit = " n/a" then (* released archive has no .git *)
11
+ release_commit
12
+ else
13
+ commit
14
+ in
8
15
Format. sprintf " %s (%s)" release commit
16
+ )
You can’t perform that action at this time.
0 commit comments