mirror of
https://github.com/home-assistant/core
synced 2024-07-30 21:18:57 +02:00
Update azure-pipelines.yml for check version (#24194)
This commit is contained in:
parent
1a3a38d370
commit
e7d34913c0
@ -8,7 +8,6 @@ trigger:
|
||||
tags:
|
||||
include:
|
||||
- '*'
|
||||
|
||||
variables:
|
||||
- name: versionBuilder
|
||||
value: '3.2'
|
||||
@ -18,6 +17,7 @@ variables:
|
||||
- group: wheels
|
||||
- group: github
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
- job: 'Wheels'
|
||||
@ -96,8 +96,30 @@ jobs:
|
||||
displayName: 'Run wheels build'
|
||||
|
||||
|
||||
- job: 'Release'
|
||||
- job: 'VersionValidate'
|
||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
displayName: 'Use Python 3.7'
|
||||
inputs:
|
||||
versionSpec: '3.7'
|
||||
- script: |
|
||||
setup_version="$(python setup.py -V)"
|
||||
branch_version="$(Build.SourceBranchName)"
|
||||
|
||||
if [ "${setup_version}" != "${branch_version}" ]; then
|
||||
echo "Version of tag ${branch_version} don't match with ${setup_version}!"
|
||||
exit 1
|
||||
fi
|
||||
displayName: 'Check version of branch/tag'
|
||||
|
||||
|
||||
- job: 'Release'
|
||||
condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags'), succeeded('VersionValidate')
|
||||
dependsOn:
|
||||
- 'VersionValidate'
|
||||
timeoutInMinutes: 120
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
|
Loading…
Reference in New Issue
Block a user