-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: move docs to appropriate section
- Loading branch information
Showing
2 changed files
with
39 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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>)`, | ||
|
@@ -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> | ||
|
@@ -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> | ||
|
@@ -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> | ||
|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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> | ||
|
@@ -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> | ||
|
@@ -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> |