Skip to content

Commit

Permalink
docs: move docs to appropriate section
Browse files Browse the repository at this point in the history
  • Loading branch information
arturcic committed Feb 8, 2025
1 parent c9d4571 commit 026c844
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 39 deletions.
40 changes: 20 additions & 20 deletions docs/examples/azure/gitversion/execute.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,23 @@ steps:
</details>
### Example 7
<details>
<summary>Calculate the version for the build. Update the version in the project files.</summary>
```yaml
steps:
# gitversion/[email protected] task omitted for brevity.

- task: gitversion/[email protected]
displayName: Determine Version
inputs:
updateProjectFiles: true
```
</details>
## Output usage
The outputs can be accessed using the syntax `$(<id>.<outputName>)` or `$(<id>.GitVersion_<OutputName>)`,
Expand All @@ -239,7 +256,7 @@ The multi-job output variables can be accessed across jobs and stages, in both c
**GitVersion also automatically updates the pre-defined Build variable `Build.BuildNumber`.**
You can disable the default behavior by setting the `update-build-number` to `false` in the configuration file or by using the `overrideConfig` input.

### Example 7
### Example 8

<details>
<summary>Calculate the version for the build and use the output in a subsequent steps within the same job.</summary>
Expand Down Expand Up @@ -309,7 +326,7 @@ jobs:

</details>

### Example 8
### Example 9

<details>
<summary>Calculate the version for the build and use the output in a subsequent job.</summary>
Expand Down Expand Up @@ -397,7 +414,7 @@ jobs:

</details>

### Example 9
### Example 10

<details>
<summary>Calculate the version for the build and use the output in a subsequent stage.</summary>
Expand Down Expand Up @@ -491,20 +508,3 @@ stages:
```

</details>

### Example 10

<details>
<summary>Calculate the version for the build. Update the version in the project files.</summary>

```yaml
steps:
# gitversion/[email protected] task omitted for brevity.
- task: gitversion/[email protected]
displayName: Determine Version
inputs:
updateProjectFiles: true
```

</details>
38 changes: 19 additions & 19 deletions docs/examples/github/gitversion/execute.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,31 @@ steps:
</details>
### Example 7
<details>
<summary>Calculate the version for the build. Update the version in the project files.</summary>
```yaml
steps:
# gittools/actions/gitversion/[email protected] action omitted for brevity.

- name: Determine Version
uses: gittools/actions/gitversion/[email protected]
with:
updateProjectFiles: true
```
</details>
## Output usage
The outputs can be accessed using the syntax `${{ steps.<id>.outputs.<outputName> }}` or `${{ steps.<id>.outputs.GitVersion_<OutputName> }}`,
where `<id>` is the ID assigned to the step that calls the action, by subsequent steps later in the same job.

The action also creates environment variables of the form `${{ env.<outputName> }}` or `${{ env.GitVersion_<OutputName> }}` for use by other steps in the same job.

### Example 7
### Example 8

<details>
<summary>Calculate the version for the build and use the output in a subsequent steps within the same job.</summary>
Expand Down Expand Up @@ -317,7 +334,7 @@ jobs:

</details>

### Example 8
### Example 9

<details>
<summary>Calculate the version for the build and use the output in a subsequent job.</summary>
Expand Down Expand Up @@ -462,20 +479,3 @@ jobs:
```

</details>

### Example 9

<details>
<summary>Calculate the version for the build. Update the version in the project files.</summary>

```yaml
steps:
# gittools/actions/gitversion/[email protected] action omitted for brevity.
- name: Determine Version
uses: gittools/actions/gitversion/[email protected]
with:
updateProjectFiles: true
```

</details>

0 comments on commit 026c844

Please sign in to comment.