Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Make it clear that the Setup step must be ran before the Execue step #1068

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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