Skip to content

Commit

Permalink
updated code/samples to use version latest version of tools
Browse files Browse the repository at this point in the history
  • Loading branch information
arturcic committed Jul 22, 2024
1 parent 95a86de commit d2063e5
Show file tree
Hide file tree
Showing 26 changed files with 166 additions and 166 deletions.
2 changes: 1 addition & 1 deletion .azure/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ variables:
- name: DOTNET_CLI_TELEMETRY_OPTOUT
value: 'true'
- name: INPUT_VERSIONSPEC
value: '5.x'
value: '6.x'
- name: INPUT_INCLUDEPRERELEASE
value: 'false'
- name: INPUT_IGNOREFAILEDSOURCES
Expand Down
38 changes: 19 additions & 19 deletions .azure/example-10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ variables:
value: 'true'

stages:
- stage: GitVersion_v5_cross_stage
displayName: GitVersion v5 (cross stage)
- stage: GitVersion_v6_cross_stage
displayName: GitVersion v6 (cross stage)
jobs:
- job: GitVersion_v5_cross_stage_producer
displayName: GitVersion v5 (cross stage producer)
- job: GitVersion_v6_cross_stage_producer
displayName: GitVersion v6 (cross stage producer)
pool:
vmImage: ubuntu-latest
steps:
Expand All @@ -21,23 +21,23 @@ stages:
- task: gitversion/setup@2.0.0
displayName: Install GitVersion
inputs:
versionSpec: '5.x'
versionSpec: '6.x'

- task: gitversion/execute@2.0.0
displayName: Determine Version
name: version_step # step id used as reference for output values
inputs:
overrideConfig: |
update-build-number=false
- stage: GitVersion_v5_cross_stage_consumer_without_prefix
displayName: GitVersion v5 (cross stage consumer) - without prefix
dependsOn: GitVersion_v5_cross_stage
condition: and(succeeded(), eq(dependencies.GitVersion_v5_cross_stage.outputs['GitVersion_v5_cross_stage_producer.version_step.branchName'], 'main')) # use in condition
- stage: GitVersion_v6_cross_stage_consumer_without_prefix
displayName: GitVersion v6 (cross stage consumer) - without prefix
dependsOn: GitVersion_v6_cross_stage
condition: and(succeeded(), eq(dependencies.GitVersion_v6_cross_stage.outputs['GitVersion_v6_cross_stage_producer.version_step.branchName'], 'main')) # use in condition
jobs:
- job: GitVersion_v5_cross_stage_consumer_without_prefix
displayName: GitVersion v5 (cross stage consumer) - without prefix
- job: GitVersion_v6_cross_stage_consumer_without_prefix
displayName: GitVersion v6 (cross stage consumer) - without prefix
variables:
myvar_fullSemVer: $[ stageDependencies.GitVersion_v5_cross_stage.GitVersion_v5_cross_stage_producer.outputs['version_step.fullSemVer'] ]
myvar_fullSemVer: $[ stageDependencies.GitVersion_v6_cross_stage.GitVersion_v6_cross_stage_producer.outputs['version_step.fullSemVer'] ]
pool:
vmImage: ubuntu-latest
steps:
Expand All @@ -60,15 +60,15 @@ stages:
displayName: Use mapped local env from job variables (bash - outputs without prefix)
env:
localvar_fullSemVer: $(myvar_fullSemVer)
- stage: GitVersion_v5_cross_stage_consumer_with_prefix
displayName: GitVersion v5 (cross stage consumer) - with prefix
dependsOn: GitVersion_v5_cross_stage
condition: and(succeeded(), eq(dependencies.GitVersion_v5_cross_stage.outputs['GitVersion_v5_cross_stage_producer.version_step.GitVersion_BranchName'], 'main')) # use in condition
- stage: GitVersion_v6_cross_stage_consumer_with_prefix
displayName: GitVersion v6 (cross stage consumer) - with prefix
dependsOn: GitVersion_v6_cross_stage
condition: and(succeeded(), eq(dependencies.GitVersion_v6_cross_stage.outputs['GitVersion_v6_cross_stage_producer.version_step.GitVersion_BranchName'], 'main')) # use in condition
jobs:
- job: GitVersion_v5_cross_stage_consumer_with_prefix
displayName: GitVersion v5 (cross stage consumer) - with prefix
- job: GitVersion_v6_cross_stage_consumer_with_prefix
displayName: GitVersion v6 (cross stage consumer) - with prefix
variables:
myvar_GitVersion_FullSemVer: $[ stageDependencies.GitVersion_v5_cross_stage.GitVersion_v5_cross_stage_producer.outputs['version_step.GitVersion_FullSemVer'] ]
myvar_GitVersion_FullSemVer: $[ stageDependencies.GitVersion_v6_cross_stage.GitVersion_v6_cross_stage_producer.outputs['version_step.GitVersion_FullSemVer'] ]
pool:
vmImage: ubuntu-latest
steps:
Expand Down
6 changes: 3 additions & 3 deletions .azure/example-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ variables:
value: 'true'

jobs:
- job: GitVersion_v5_same_job
displayName: GitVersion v5 (same job)
- job: GitVersion_v6_same_job
displayName: GitVersion v6 (same job)
pool:
vmImage: ubuntu-latest
steps:
Expand All @@ -18,7 +18,7 @@ jobs:
- task: gitversion/setup@2.0.0
displayName: Install GitVersion
inputs:
versionSpec: '5.x'
versionSpec: '6.x'

- task: gitversion/execute@2.0.0
displayName: Determine Version
Expand Down
26 changes: 13 additions & 13 deletions .azure/example-9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ variables:
value: 'true'

jobs:
- job: GitVersion_v5_cross_job
displayName: GitVersion v5 (cross job)
- job: GitVersion_v6_cross_job
displayName: GitVersion v6 (cross job)
pool:
vmImage: ubuntu-latest
steps:
Expand All @@ -18,7 +18,7 @@ jobs:
- task: gitversion/setup@2.0.0
displayName: Install GitVersion
inputs:
versionSpec: '5.x'
versionSpec: '6.x'

- task: gitversion/execute@2.0.0
displayName: Determine Version
Expand All @@ -27,12 +27,12 @@ jobs:
overrideConfig: |
update-build-number=false
- job: GitVersion_v5_cross_job_consumer_without_prefix
displayName: GitVersion v5 (cross job consumer) - without prefix
dependsOn: GitVersion_v5_cross_job
condition: and(succeeded(), eq(dependencies.GitVersion_v5_cross_job.outputs['version_step.branchName'], 'main')) # use in condition
- job: GitVersion_v6_cross_job_consumer_without_prefix
displayName: GitVersion v6 (cross job consumer) - without prefix
dependsOn: GitVersion_v6_cross_job
condition: and(succeeded(), eq(dependencies.GitVersion_v6_cross_job.outputs['version_step.branchName'], 'main')) # use in condition
variables:
myvar_fullSemVer: $[ dependencies.GitVersion_v5_cross_job.outputs['version_step.fullSemVer'] ]
myvar_fullSemVer: $[ dependencies.GitVersion_v6_cross_job.outputs['version_step.fullSemVer'] ]
pool:
vmImage: ubuntu-latest
steps:
Expand All @@ -56,12 +56,12 @@ jobs:
env:
localvar_fullSemVer: $(myvar_fullSemVer)
- job: GitVersion_v5_cross_job_consumer_with_prefix
displayName: GitVersion v5 (cross job consumer) - with prefix
dependsOn: GitVersion_v5_cross_job
condition: and(succeeded(), eq(dependencies.GitVersion_v5_cross_job.outputs['version_step.GitVersion_BranchName'], 'main')) # use in condition
- job: GitVersion_v6_cross_job_consumer_with_prefix
displayName: GitVersion v6 (cross job consumer) - with prefix
dependsOn: GitVersion_v6_cross_job
condition: and(succeeded(), eq(dependencies.GitVersion_v6_cross_job.outputs['version_step.GitVersion_BranchName'], 'main')) # use in condition
variables:
myvar_GitVersion_FullSemVer: $[ dependencies.GitVersion_v5_cross_job.outputs['version_step.GitVersion_FullSemVer'] ]
myvar_GitVersion_FullSemVer: $[ dependencies.GitVersion_v6_cross_job.outputs['version_step.GitVersion_FullSemVer'] ]
pool:
vmImage: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/checkout-path.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@main
with:
versionSpec: '5.x'
versionSpec: '6.x'

- name: Determine version
id: gitversion
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: gitversion/setup
uses: ./gitversion/setup
with:
versionSpec: '5.x'
versionSpec: '6.x'
- name: gitversion/execute
id: gitversion # step id used as reference for output values
uses: ./gitversion/execute
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/example-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ defaults:
shell: pwsh

jobs:
GitVersion_v5_same_job:
name: GitVersion v5 (same job)
GitVersion_v6_same_job:
name: GitVersion v6 (same job)
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -19,7 +19,7 @@ jobs:
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v2.0.0
with:
versionSpec: '5.x'
versionSpec: '6.x'

- name: Determine Version
id: version_step # step id used as reference for output values
Expand Down
42 changes: 21 additions & 21 deletions .github/workflows/example-9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ defaults:
shell: pwsh

jobs:
GitVersion_v5_cross_job:
name: GitVersion v5 (cross job)
GitVersion_v6_cross_job:
name: GitVersion v6 (cross job)
runs-on: ubuntu-latest
outputs:
branchName: ${{ steps.version_step.outputs.branchName }}
Expand All @@ -25,19 +25,19 @@ jobs:
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v2.0.0
with:
versionSpec: '5.x'
versionSpec: '6.x'

- name: Determine Version
id: version_step # step id used as reference for output values
uses: gittools/actions/gitversion/execute@v2.0.0

GitVersion_v5_cross_job_consumer_without_prefix:
name: GitVersion v5 (cross job consumer) - without prefix
needs: GitVersion_v5_cross_job
GitVersion_v6_cross_job_consumer_without_prefix:
name: GitVersion v6 (cross job consumer) - without prefix
needs: GitVersion_v6_cross_job
runs-on: ubuntu-latest
if: contains(needs.GitVersion_v5_cross_job.outputs['branchName'], 'main')
if: contains(needs.GitVersion_v6_cross_job.outputs['branchName'], 'main')
env:
myvar_fullSemVer: ${{ needs.GitVersion_v5_cross_job.outputs.fullSemVer }}
myvar_fullSemVer: ${{ needs.GitVersion_v6_cross_job.outputs.fullSemVer }}
steps:
- run: |
echo "FullSemVer (env:myvar_fullSemVer) : $env:myvar_fullSemVer"
Expand All @@ -49,7 +49,7 @@ jobs:
name: Use local env mapped from output (pwsh - outputs without prefix)
shell: pwsh
env:
localvar_fullSemVer: ${{ needs.GitVersion_v5_cross_job.outputs.fullSemVer }}
localvar_fullSemVer: ${{ needs.GitVersion_v6_cross_job.outputs.fullSemVer }}
- run: |
echo "FullSemVer (env:localvar_fullSemVer) : $env:localvar_fullSemVer"
Expand All @@ -59,7 +59,7 @@ jobs:
localvar_fullSemVer: ${{ env.myvar_fullSemVer }}
- run: |
echo "FullSemVer (needs.GitVersion_v5_cross_job.outputs.fullSemVer) : ${{ needs.GitVersion_v5_cross_job.outputs.fullSemVer }}"
echo "FullSemVer (needs.GitVersion_v6_cross_job.outputs.fullSemVer) : ${{ needs.GitVersion_v6_cross_job.outputs.fullSemVer }}"
name: Use direct output from previous job (pwsh - outputs without prefix)
shell: pwsh
Expand All @@ -73,7 +73,7 @@ jobs:
name: Use local env mapped from output (bash - outputs without prefix)
shell: bash
env:
localvar_fullSemVer: ${{ needs.GitVersion_v5_cross_job.outputs.fullSemVer }}
localvar_fullSemVer: ${{ needs.GitVersion_v6_cross_job.outputs.fullSemVer }}
- run: |
echo "FullSemVer (localvar_fullSemVer) : $localvar_fullSemVer"
Expand All @@ -83,17 +83,17 @@ jobs:
localvar_fullSemVer: ${{ env.myvar_fullSemVer }}
- run: |
echo "FullSemVer (needs.GitVersion_v5_cross_job.outputs.fullSemVer) : ${{ needs.GitVersion_v5_cross_job.outputs.fullSemVer }}"
echo "FullSemVer (needs.GitVersion_v6_cross_job.outputs.fullSemVer) : ${{ needs.GitVersion_v6_cross_job.outputs.fullSemVer }}"
name: Use direct output from previous job (bash - outputs without prefix)
shell: bash
GitVersion_v5_cross_job_consumer_with_prefix:
name: GitVersion v5 (cross job consumer) - with prefix
needs: GitVersion_v5_cross_job
GitVersion_v6_cross_job_consumer_with_prefix:
name: GitVersion v6 (cross job consumer) - with prefix
needs: GitVersion_v6_cross_job
runs-on: ubuntu-latest
if: contains(needs.GitVersion_v5_cross_job.outputs['GitVersion_BranchName'], 'main')
if: contains(needs.GitVersion_v6_cross_job.outputs['GitVersion_BranchName'], 'main')
env:
myvar_GitVersion_FullSemVer: ${{ needs.GitVersion_v5_cross_job.outputs.GitVersion_FullSemVer }}
myvar_GitVersion_FullSemVer: ${{ needs.GitVersion_v6_cross_job.outputs.GitVersion_FullSemVer }}
steps:
- run: |
echo "FullSemVer (env:myvar_GitVersion_FullSemVer) : $env:myvar_GitVersion_FullSemVer"
Expand All @@ -105,7 +105,7 @@ jobs:
name: Use local env mapped from output (pwsh - outputs without prefix)
shell: pwsh
env:
localvar_fullSemVer: ${{ needs.GitVersion_v5_cross_job.outputs.GitVersion_FullSemVer }}
localvar_fullSemVer: ${{ needs.GitVersion_v6_cross_job.outputs.GitVersion_FullSemVer }}
- run: |
echo "FullSemVer (env:localvar_fullSemVer) : $env:localvar_fullSemVer"
Expand All @@ -115,7 +115,7 @@ jobs:
localvar_fullSemVer: ${{ env.myvar_GitVersion_FullSemVer }}
- run: |
echo "FullSemVer (needs.GitVersion_v5_cross_job.outputs.GitVersion_FullSemVer) : ${{ needs.GitVersion_v5_cross_job.outputs.GitVersion_FullSemVer }}"
echo "FullSemVer (needs.GitVersion_v6_cross_job.outputs.GitVersion_FullSemVer) : ${{ needs.GitVersion_v6_cross_job.outputs.GitVersion_FullSemVer }}"
name: Use direct output from previous job (pwsh - outputs without prefix)
shell: pwsh
Expand All @@ -129,7 +129,7 @@ jobs:
name: Use local env mapped from output (bash - outputs without prefix)
shell: bash
env:
localvar_fullSemVer: ${{ needs.GitVersion_v5_cross_job.outputs.GitVersion_FullSemVer }}
localvar_fullSemVer: ${{ needs.GitVersion_v6_cross_job.outputs.GitVersion_FullSemVer }}
- run: |
echo "FullSemVer (localvar_fullSemVer) : $localvar_fullSemVer"
Expand All @@ -139,6 +139,6 @@ jobs:
localvar_fullSemVer: ${{ env.myvar_GitVersion_FullSemVer }}
- run: |
echo "FullSemVer (needs.GitVersion_v5_cross_job.outputs.GitVersion_FullSemVer) : ${{ needs.GitVersion_v5_cross_job.outputs.GitVersion_FullSemVer }}"
echo "FullSemVer (needs.GitVersion_v6_cross_job.outputs.GitVersion_FullSemVer) : ${{ needs.GitVersion_v6_cross_job.outputs.GitVersion_FullSemVer }}"
name: Use direct output from previous job (bash - outputs without prefix)
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Install GitVersion
uses: ./gitversion/setup
with:
versionSpec: '5.x'
versionSpec: '6.x'
- name: Use GitVersion
id: gitversion # step id used as reference for output values
uses: ./gitversion/execute
Expand Down
4 changes: 2 additions & 2 deletions dist/azure/gitversion/setup/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"label": "The version spec",
"defaultValue": "",
"required": true,
"helpMarkDown": "Required version in the form of 5.x or exact version like 5.12.0"
"helpMarkDown": "Required version in the form of 6.x or exact version like 6.0.0"
},
{
"name": "includePrerelease",
Expand All @@ -55,4 +55,4 @@
"helpMarkDown": "Prefer to download the latest version matching the versionSpec, even if there is a local cached version."
}
]
}
}
14 changes: 7 additions & 7 deletions docs/examples/azure/gitreleasemanager/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The Setup GitReleaseManager action accepts the following inputs:

```yaml
versionSpec:
description: Required version in the form of 0.17.x or exact version like 0.17.0.
description: Required version in the form of 0.18.x or exact version like 0.18.0.
required: true
default: ''
includePrerelease:
Expand All @@ -19,37 +19,37 @@ ignoreFailedSources:
### Example 1
Install the latest GitReleaseManager 0.17.x version.
Install the latest GitReleaseManager 0.18.x version.
```yaml
steps:
- task: gitreleasemanager/setup@2.0.0
displayName: Install GitReleaseManager
inputs:
versionSpec: '0.17.x'
versionSpec: '0.18.x'
```
### Example 2
Install specific GitReleaseManager version 0.17.0.
Install specific GitReleaseManager version 0.18.0.
```yaml
steps:
- task: gitreleasemanager/setup@2.0.0
displayName: Install GitReleaseManager
inputs:
versionSpec: '0.17.0'
versionSpec: '0.18.0'
```
### Example 3
Install the latest GitReleaseManager 0.17.x version even it there is a cached version matching the versionSpec.
Install the latest GitReleaseManager 0.18.x version even it there is a cached version matching the versionSpec.
```yaml
steps:
- task: gitreleasemanager/setup@2.0.0
displayName: Install GitReleaseManager
inputs:
versionSpec: '0.17.x'
versionSpec: '0.18.x'
preferLatestVersion: true
```
Loading

0 comments on commit d2063e5

Please sign in to comment.