From 8822caad9ce76c9c7b55edf9bcb4c1f6efd2bb55 Mon Sep 17 00:00:00 2001 From: Alan Ball Date: Thu, 13 Jul 2023 15:03:51 -0400 Subject: [PATCH 1/2] Update Information.fs --- src/app/Fake.Tools.Git/Information.fs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/Fake.Tools.Git/Information.fs b/src/app/Fake.Tools.Git/Information.fs index ee3bb35fff1..41a0a2f4691 100644 --- a/src/app/Fake.Tools.Git/Information.fs +++ b/src/app/Fake.Tools.Git/Information.fs @@ -80,7 +80,14 @@ module Information = match Environment.environVarOrNone "BUILD_SOURCEVERSION" with | None -> reraise () | Some s -> s - + /// + /// Returns the short SHA1 of the current HEAD + /// + /// + /// The git repository. + let getShortSHA1 repositoryDir = + let _, msg, _ = CommandHelper.runGitCommand repositoryDir "rev-parse --short HEAD" + msg |> String.separated "" /// /// Shows the git status /// From 7ffd4f90097b3fc40e651139b118ed8d0f65025a Mon Sep 17 00:00:00 2001 From: Alan Ball Date: Mon, 30 Oct 2023 09:38:51 -0400 Subject: [PATCH 2/2] improved name --- src/app/Fake.Tools.Git/Information.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/Fake.Tools.Git/Information.fs b/src/app/Fake.Tools.Git/Information.fs index 41a0a2f4691..503cdbd18e9 100644 --- a/src/app/Fake.Tools.Git/Information.fs +++ b/src/app/Fake.Tools.Git/Information.fs @@ -85,7 +85,7 @@ module Information = /// /// /// The git repository. - let getShortSHA1 repositoryDir = + let getCurrentShortSHA1 repositoryDir = let _, msg, _ = CommandHelper.runGitCommand repositoryDir "rev-parse --short HEAD" msg |> String.separated "" ///