Skip to content

Commit

Permalink
Set dBTestCompareVersion as latest tag version when release created o…
Browse files Browse the repository at this point in the history
…n github
  • Loading branch information
raczeja committed Mar 27, 2020
1 parent cb54e89 commit ac5beb8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ variables:
value: 1.5

steps:
- task: PowerShell@2
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
inputs:
targetType: 'inline'
script: |
$TagArray= git tag -l *
$AppVersion = $TagArray[$TagArray.Count – 1]
Write-Host "##vso[task.setvariable variable=dBTestCompareVersion;]$AppVersion"
- task: PowerShell@2
inputs:
Expand Down Expand Up @@ -77,7 +87,7 @@ steps:
targetFolder: $(Build.ArtifactStagingDirectory)

- task: GitHubRelease@1
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
condition: and(succeeded(),startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
inputs:
gitHubConnection: 'github.com_dbtestcompare'
repositoryName: '$(Build.Repository.Name)'
Expand Down

0 comments on commit ac5beb8

Please sign in to comment.