From 6924ff67935751267a068c34255047c6ab4f92e8 Mon Sep 17 00:00:00 2001 From: seanarmstrong87 Date: Fri, 16 Sep 2022 08:37:23 +0200 Subject: [PATCH 1/2] Added note to explain about fetchDepth restriction --- docs/examples/azure/gitversion/execute/usage-examples.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/examples/azure/gitversion/execute/usage-examples.md b/docs/examples/azure/gitversion/execute/usage-examples.md index 616a7256..e23d6a67 100644 --- a/docs/examples/azure/gitversion/execute/usage-examples.md +++ b/docs/examples/azure/gitversion/execute/usage-examples.md @@ -4,6 +4,13 @@ Find out how to use the **gitversion/execute** task using the examples below. > The examples use the latest _0.x_ version of the GitVersion Execute task. It is recommended to use the latest released version in your own pipelines. +Note that if the pipeline is setup to use a shallow git fetch mode the GitVersion Execute task will fail. It is required to use fetchDepth of 0 like so: + +```yaml +- checkout: self + fetchDepth: 1 +``` + ## Inputs The Execute GitVersion task accepts the following inputs: From 269bb92c06b6a680e0122a2cb61e9f036ed28a7a Mon Sep 17 00:00:00 2001 From: seanarmstrong87 Date: Mon, 10 Oct 2022 16:58:23 +0200 Subject: [PATCH 2/2] Update usage-examples.md --- docs/examples/azure/gitversion/execute/usage-examples.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples/azure/gitversion/execute/usage-examples.md b/docs/examples/azure/gitversion/execute/usage-examples.md index e23d6a67..05b037d4 100644 --- a/docs/examples/azure/gitversion/execute/usage-examples.md +++ b/docs/examples/azure/gitversion/execute/usage-examples.md @@ -8,7 +8,7 @@ Note that if the pipeline is setup to use a shallow git fetch mode the GitVersio ```yaml - checkout: self - fetchDepth: 1 + fetchDepth: 0 ``` ## Inputs