mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-26 14:36:30 +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:
|
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'
|
- job: 'Release'
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags'), succeeded('VersionValidate'))
|
||||||
|
dependsOn:
|
||||||
|
- 'VersionValidate'
|
||||||
timeoutInMinutes: 240
|
timeoutInMinutes: 240
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- 'ShellCheck'
|
- 'ShellCheck'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user