Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion build-tools/automation/azure-pipelines-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,24 @@ stages:
parameters:
installApkDiff: false

### Copy .dll, .exe, .pdb files for APIScan
- pwsh: |
$previousVersion = (& "$(System.DefaultWorkingDirectory)/bin/$(XA.Build.Configuration)/dotnet/dotnet.exe" msbuild "$(System.DefaultWorkingDirectory)/eng/Versions.props" -nologo -getProperty:AndroidNetPreviousVersion | Out-String).Trim()
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
# An empty or malformed value would make the exclusion below drop every pack from the scan.
if ($previousVersion -notmatch '^\d+\.\d+\.\d+(-[0-9A-Za-z.]+)?$') {
Write-Host "##vso[task.logissue type=error]Unexpected AndroidNetPreviousVersion: '$previousVersion'"
exit 1
}
Write-Host "##vso[task.setvariable variable=AndroidNetPreviousVersion]$previousVersion"
displayName: Read previous .NET for Android pack version

### Copy .dll, .exe, .pdb files for APIScan, excluding the previous-major workload.
- task: CopyFiles@2
displayName: Collect Files for APIScan
inputs:
Contents: |
$(System.DefaultWorkingDirectory)\bin\$(XA.Build.Configuration)\dotnet\packs\Microsoft.Android*\**\?(*.dll|*.exe|*.pdb)
!$(System.DefaultWorkingDirectory)\bin\$(XA.Build.Configuration)\dotnet\packs\Microsoft.Android*\$(AndroidNetPreviousVersion)\**
TargetFolder: $(Agent.TempDirectory)\T
OverWrite: true
flattenFolders: true
Expand Down