mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-24 13:36:31 +00:00
Update azure-pipelines-release.yml for Azure Pipelines
This commit is contained in:
parent
1e627fed34
commit
a04fa47883
@ -17,9 +17,34 @@ variables:
|
||||
|
||||
jobs:
|
||||
|
||||
- job: 'VersionValidate'
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- script: |
|
||||
. buildroot-external/meta
|
||||
|
||||
if [ "${VERSION_MAJOR}.${VERSION_BUILD}" != "$(Build.SourceBranchName)" ]; then
|
||||
exit 1
|
||||
fi
|
||||
displayName: 'Check version of branch/tag'
|
||||
- script: |
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
jq curl
|
||||
release="$(Build.SourceBranchName)"
|
||||
created_by="$(curl -s https://api.github.com/repos/home-assistant/hassos/releases/tags/${release} | jq --raw-output '.author.login')"
|
||||
if [[ "${created_by}" =~ ^(balloob|pvizeli|fabaff|robbiet480)$ ]]; then
|
||||
exit 0
|
||||
fi
|
||||
echo "${created_by} is not allowed to create an release!"
|
||||
exit 1
|
||||
displayName: 'Check rights'
|
||||
|
||||
|
||||
- job: 'Release'
|
||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
||||
condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags'), succeeded('VersionValidate'))
|
||||
dependsOn:
|
||||
- 'VersionValidate'
|
||||
timeoutInMinutes: 240
|
||||
dependsOn:
|
||||
- 'ShellCheck'
|
||||
|
Loading…
x
Reference in New Issue
Block a user