parameters:
  PackageName: ''
  PackageNames: ''
  ServiceDirectory: ''
  TestPipeline: false

steps:
- ${{ if eq(parameters.TestPipeline, 'true') }}:
    - task: PowerShell@2
      displayName: Prep template pipeline for release
      condition: and(succeeded(), ne(variables['Skip.SetTestPipelineVersion'], 'true'))
      inputs:
        workingDirectory: $(Build.SourcesDirectory)
        filePath: $(Build.SourcesDirectory)/eng/common/scripts/SetTestPipelineVersion.ps1
        arguments: >
          -BuildID $(Build.BuildId)
          -PackageNames '${{ coalesce(parameters.PackageName, parameters.PackageNames) }}'
          -ServiceDirectory '${{ parameters.ServiceDirectory }}'
        pwsh: true
