parameters:
  PackageName: ''
  PackageNames: ''
  ServiceDirectory: ''
  TagSeparator: '_'
  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 }}'
          -TagSeparator '${{ parameters.TagSeparator }}'
        pwsh: true
