forked from robur/blog.robur.coop
Merge pull request 'include if git worktree was dirty' (#3) from git-describe into main
Reviewed-on: robur/blog.robur.coop#3
This commit is contained in:
commit
09d23602df
1 changed files with 4 additions and 1 deletions
|
@ -127,7 +127,10 @@ let run_git_config key = function
|
||||||
|
|
||||||
let run_git_rev_parse default =
|
let run_git_rev_parse default =
|
||||||
let open Bos in
|
let open Bos in
|
||||||
let value = OS.Cmd.run_out Cmd.(v "git" % "rev-parse" % "HEAD") in
|
let value = OS.Cmd.run_out
|
||||||
|
Cmd.(v "git" % "describe" % "--always" % "--dirty"
|
||||||
|
% "--exclude=*" % "--abbrev=0")
|
||||||
|
in
|
||||||
match OS.Cmd.out_string value with
|
match OS.Cmd.out_string value with
|
||||||
| Ok (value, (_, `Exited 0)) -> value
|
| Ok (value, (_, `Exited 0)) -> value
|
||||||
| Ok (value, (run_info, _)) ->
|
| Ok (value, (run_info, _)) ->
|
||||||
|
|
Loading…
Reference in a new issue