Skip to content

Commit

Permalink
Replace GitVersion task to fix pipeline - Fixes #746 (#747)
Browse files Browse the repository at this point in the history
  • Loading branch information
PlagueHO authored Apr 10, 2022
1 parent 9940d6b commit e2582d3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added `SECURITY.md`.
- Updated pipeline `Deploy_Module` anb `Code_Coverage` jobs to use `ubuntu-latest`
images - Partially fixes - Fixes [Issue #735](https://github.com/dsccommunity/xPSDesiredStateConfiguration/issues/735).
- Replaced the GitVersion task in the `azure-pipelines.yml` with
script - Fixes [Issue #746](https://github.com/dsccommunity/xPSDesiredStateConfiguration/issues/746).

## [9.1.0] - 2020-02-19

Expand Down
19 changes: 11 additions & 8 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,25 @@ stages:
pool:
vmImage: 'windows-2019'
steps:
- task: GitVersion@5
name: gitversion
displayName: 'Evaluate Next Version'
inputs:
runtime: 'core'
configFilePath: 'GitVersion.yml'
- pwsh: |
dotnet tool install --global GitVersion.Tool
$gitVersionObject = dotnet-gitversion | ConvertFrom-Json
$gitVersionObject.PSObject.Properties.ForEach{
Write-Host -Object "Setting Task Variable '$($_.Name)' with value '$($_.Value)'."
Write-Host -Object "##vso[task.setvariable variable=$($_.Name);]$($_.Value)"
}
Write-Host -Object "##vso[build.updatebuildnumber]$($gitVersionObject.FullSemVer)"
displayName: Calculate ModuleVersion (GitVersion)
- task: PowerShell@2
name: package
displayName: 'Build & Package Module'
inputs:
filePath: './build.ps1'
arguments: '-Tasks pack -ResolveDependency'
arguments: '-ResolveDependency -tasks pack'
pwsh: true
env:
ModuleVersion: $(gitVersion.Informationalversion)
ModuleVersion: $(NuGetVersionV2)

- task: PublishPipelineArtifact@1
displayName: 'Publish Pipeline Artifact'
Expand Down

0 comments on commit e2582d3

Please sign in to comment.