Skip to content

Commit

Permalink
Merge pull request #1068 from deadlydog/UpdateDocsToMentionRunningSet…
Browse files Browse the repository at this point in the history
…upStepFirst

docs: Make it clear that the Setup step must be ran before the Execue step
  • Loading branch information
arturcic authored Mar 10, 2024
2 parents ed3740f + f5fe675 commit a303dc3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
10 changes: 9 additions & 1 deletion docs/examples/azure/gitversion/execute/usage-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@ 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:
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: 0`.
You must also run the GitVersion Setup step before the Execute step:

```yaml
- checkout: self
fetchDepth: 0

- task: gitversion/setup@0
displayName: Install GitVersion
inputs:
versionSpec: '5.x'
```
These steps are omitted from the examples for brevity.
## Inputs
The Execute GitVersion task accepts the following inputs:
Expand Down
2 changes: 2 additions & 0 deletions docs/examples/azure/gitversion/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Use the following links to see usage examples of the Setup GitVersion (**gitversion/setup**) and Execute GitVersion (**gitversion/execute**) tasks.

Note: You need to run the Setup step before the Execute step, otherwise the Execute step will fail with the error `Unable to locate executable file: 'dotnet-gitversion'`.

## Setup GitVersion (gitversion/setup)

- [Usage examples](setup/usage-examples.md)
Expand Down
10 changes: 8 additions & 2 deletions docs/examples/github/gitversion/execute/usage-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@

Find out how to use the **gitversion/execute** action using the examples below.

For the GitVersion workflow to execute successfully, you must checkout your Git repository with `fetch-depth: 0` to fetch all history for all tags and branches, as follows:
For the GitVersion workflow to execute successfully, you must checkout your Git repository with `fetch-depth: 0` to fetch all history for all tags and branches.
You must also run the GitVersion Setup step before the Execute step:

```yaml
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- task: gitversion/setup@0
displayName: Install GitVersion
inputs:
versionSpec: '5.x'
```
This step is omitted from the examples for brevity.
These steps are omitted from the examples for brevity.
> The examples use version _0.9.7_ of the GitVersion Execute action. It is recommended to use the latest released version in your own workflows.
Expand Down
2 changes: 2 additions & 0 deletions docs/examples/github/gitversion/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Use the following links to see usage examples of the Setup GitVersion (**gitversion/setup**) and Execute GitVersion (**gitversion/execute**) actions.

Note: You need to run the Setup step before the Execute step, otherwise the Execute step will fail with the error `Unable to locate executable file: 'dotnet-gitversion'`.

## Setup GitVersion (gitversion/setup)

- [Usage examples](setup/usage-examples.md)
Expand Down

0 comments on commit a303dc3

Please sign in to comment.