Skip to content

Commit

Permalink
azure-pipelines.yml: integrate IS_RELEASE variable
Browse files Browse the repository at this point in the history
In case the build was triggered for a release purpose we don't want to
use the git sha in the version of libiio.

The new variable will be used in order to identify that is a build
dedicated to a release.

Signed-off-by: Andreea Andrisan <[email protected]>
  • Loading branch information
AAndrisa committed Aug 6, 2024
1 parent c6d322a commit 7b407c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]

${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/v') }}:
IS_RELEASE: 1

trigger:
branches:
include:
Expand Down Expand Up @@ -416,7 +419,7 @@ stages:
displayName: 'Setup'
- script: |
set -e
sudo docker run --platform "linux/$(arch)" --rm -t --privileged -e ARTIFACTNAME=$(artifactName) -v "$(Agent.BuildDirectory)/s":"/ci" -v "/usr/bin/qemu-$(arch)-static":"/usr/bin/qemu-$(arch)-static" "$(image)" /bin/bash -c "cd /ci/ && chmod +x ./CI/azure/$(build_script) && ./CI/azure/$(build_script)"
sudo docker run --platform "linux/$(arch)" --rm -t --privileged -e IS_RELEASE=$IS_RELEASE -e ARTIFACTNAME=$(artifactName) -v "$(Agent.BuildDirectory)/s":"/ci" -v "/usr/bin/qemu-$(arch)-static":"/usr/bin/qemu-$(arch)-static" "$(image)" /bin/bash -c "cd /ci/ && chmod +x ./CI/azure/$(build_script) && ./CI/azure/$(build_script)"
displayName: 'Build'
- task: CopyFiles@2
inputs:
Expand Down

0 comments on commit 7b407c4

Please sign in to comment.