Merge pull request #814 from GitTools/feature/691

This commit is contained in:
Artur
2023-03-11 13:46:49 +01:00
parent b30860fe81
commit cdf70088b7
56 changed files with 725 additions and 402 deletions

View File

@@ -2,7 +2,7 @@
```yaml
steps:
- task: gitreleasemanager/close@0
- task: gitreleasemanager/close@0
inputs:
token: '$(GITHUB_TOKEN)'
owner: 'someOwner'

View File

@@ -2,7 +2,7 @@
```yaml
steps:
- task: gitreleasemanager/open@0
- task: gitreleasemanager/open@0
inputs:
token: '$(GITHUB_TOKEN)'
owner: 'someOwner'

View File

@@ -226,18 +226,19 @@ steps:
Calculate the version for the build and use the `GitVersion.BranchName` variable in a condition for starting another job.
```yaml
job: CalculateVersion
displayName: Calculate version using GitVersion
steps:
# gitversion/setup@0 task omitted for brevity.
jobs:
- job: CalculateVersion
displayName: Calculate version using GitVersion
steps:
# gitversion/setup@0 task omitted for brevity.
- task: gitversion/execute@0
displayName: Use GitVersion
name: Version # the step MUST be named to access its output variables in another job.
- task: gitversion/execute@0
displayName: Use GitVersion
name: Version # the step MUST be named to access its output variables in another job.
job: CreateReleaseNotes
condition: and(succeeded(), eq(dependencies.CalculateVersion.outputs['Version.GitVersion.BranchName'], 'main'))
dependsOn: CalculateVersion
- job: CreateReleaseNotes
condition: and(succeeded(), eq(dependencies.CalculateVersion.outputs['Version.GitVersion.BranchName'], 'main'))
dependsOn: CalculateVersion
```
### Example 8
@@ -245,18 +246,19 @@ dependsOn: CalculateVersion
Calculate the version for the build and map the `GitVersion.SemVer` variable into a variable in another job.
```yaml
job: CalculateVersion
displayName: Calculate version using GitVersion
steps:
# gitversion/setup@0 task omitted for brevity.
jobs:
- job: CalculateVersion
displayName: Calculate version using GitVersion
steps:
# gitversion/setup@0 task omitted for brevity.
- task: gitversion/execute@0
displayName: Use GitVersion
name: Version # the step MUST be named to access its output variables in another job.
- task: gitversion/execute@0
displayName: Use GitVersion
name: Version # the step MUST be named to access its output variables in another job.
job: BuildAndPack
variables:
Ver.MajorMinorPatch: $[ dependencies.CalculateVersion.outputs['Version.GitVersion.MajorMinorPatch'] ]
- job: BuildAndPack
variables:
Ver.MajorMinorPatch: $[ dependencies.CalculateVersion.outputs['Version.GitVersion.MajorMinorPatch'] ]
```
### Example 9

View File

@@ -21,6 +21,10 @@ ignoreFailedSources:
description: Treat package source failures as warnings.
required: false
default: false
preferLatestVersion:
description: Prefer to download the latest version matching the versionSpec, even if there is a local cached version.
required: false
default: 'false'
```
---
@@ -63,3 +67,16 @@ steps:
versionSpec: '6.x'
includePrerelease: true
```
### Example 4
Install the latest GitVersion 5 version even it there is a cached version matching the versionSpec.
```yaml
steps:
- task: gitversion/setup@0
displayName: Install GitVersion
inputs:
versionSpec: '5.x'
preferLatestVersion: true
```