File: daily-dev-build-variable.yml

package info (click to toggle)
python-azure 20230112%2Bgit-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 749,544 kB
  • sloc: python: 6,815,827; javascript: 287; makefile: 195; xml: 109; sh: 105
file content (24 lines) | stat: -rw-r--r-- 1,025 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# This script fragment is used across our repos to set a variable "SetDevVersion" which
# is used when this pipeline is going to be generating and publishing daily dev builds.
parameters:
  ServiceDirectory: ''
steps:
- ${{if ne(parameters.ServiceDirectory, '')}}:
  - task: Powershell@2
    inputs:
      filePath: $(Build.SourcesDirectory)/eng/common/scripts/Save-Package-Properties.ps1
      arguments: >
        -ServiceDirectory ${{parameters.ServiceDirectory}}
        -OutDirectory $(Build.ArtifactStagingDirectory)/PackageInfo
      pwsh: true
      workingDirectory: $(Pipeline.Workspace)
    displayName: Dump Package properties
    condition: succeeded()
- pwsh: |
    $setDailyDevBuild = "false"
    if (('$(Build.Reason)' -eq 'Schedule') -and ('$(System.TeamProject)' -eq 'internal')) {
      $setDailyDevBuild = "true"
    }
    echo "##vso[task.setvariable variable=SetDevVersion]$setDailyDevBuild"
  displayName: "Setup Versioning Properties"
  condition: and(succeeded(), eq(variables['SetDevVersion'], ''))