# optional step if not using cmake --install
# prepare the next package to upload
parameters:
- name: sourceDir # REQUIRED PARAMETER
  type: string
  default: ''
- name: contentsString
  type: string
  default: '**'
- name: targetDir
  type: string
  default: '$(Build.BinariesDirectory)'
- name: clean
  type: boolean
  default: true

steps:
- task: CopyFiles@2
  displayName: 'Prepare for packaging'
  inputs:
    CleanTargetFolder: ${{ parameters.clean }}
    SourceFolder: '${{ parameters.sourceDir }}'
    Contents: '${{ parameters.contentsString }}'
    TargetFolder: '${{ parameters.targetDir }}'
    retryCount: 3
