From 8822caad9ce76c9c7b55edf9bcb4c1f6efd2bb55 Mon Sep 17 00:00:00 2001 From: Alan Ball Date: Thu, 13 Jul 2023 15:03:51 -0400 Subject: [PATCH 1/3] 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/3] 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 "" /// From ad0da7ca26d98fc5f07018e490aab0e404419a8c Mon Sep 17 00:00:00 2001 From: Richard Webb Date: Fri, 12 Jan 2024 15:18:04 +0000 Subject: [PATCH 3/3] fix formatting --- src/app/Fake.Tools.Git/Information.fs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/Fake.Tools.Git/Information.fs b/src/app/Fake.Tools.Git/Information.fs index 503cdbd18e9..3afba73d3eb 100644 --- a/src/app/Fake.Tools.Git/Information.fs +++ b/src/app/Fake.Tools.Git/Information.fs @@ -80,6 +80,7 @@ module Information = match Environment.environVarOrNone "BUILD_SOURCEVERSION" with | None -> reraise () | Some s -> s + /// /// Returns the short SHA1 of the current HEAD /// @@ -88,6 +89,7 @@ module Information = let getCurrentShortSHA1 repositoryDir = let _, msg, _ = CommandHelper.runGitCommand repositoryDir "rev-parse --short HEAD" msg |> String.separated "" + /// /// Shows the git status ///