Skip to content

Commit

Permalink
Update Information.fs
Browse files Browse the repository at this point in the history
  • Loading branch information
voronoipotato authored and xperiandri committed Jan 8, 2024
1 parent 82e38df commit 8822caa
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/app/Fake.Tools.Git/Information.fs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,14 @@ module Information =
match Environment.environVarOrNone "BUILD_SOURCEVERSION" with
| None -> reraise ()
| Some s -> s

/// <summary>
/// Returns the short SHA1 of the current <c>HEAD</c>
/// </summary>
///
/// <param name="repositoryDir">The git repository.</param>
let getShortSHA1 repositoryDir =
let _, msg, _ = CommandHelper.runGitCommand repositoryDir "rev-parse --short HEAD"
msg |> String.separated ""
/// <summary>
/// Shows the git status
/// </summary>
Expand Down

0 comments on commit 8822caa

Please sign in to comment.