@@ -20,7 +20,9 @@ param (
20
20
[ValidateSet (" default" , " codecoverage" , " pogo" )]
21
21
[string ]$subtype = " default" ,
22
22
23
- $corePathSegment = " " # e.g. "core"
23
+ $corePathSegment = " " , # e.g. "core"
24
+
25
+ [string ]$destinationBase = $Env: DropPath
24
26
)
25
27
26
28
. $PSScriptRoot \pre_post_util.ps1
@@ -33,19 +35,14 @@ $coreSourcesDir = Join-Path $sourcesDir $corePathSegment
33
35
34
36
$buildName = ConstructBuildName - arch $arch - flavor $flavor - subtype $subtype
35
37
36
- #
37
- # Clean up the sentinel which previously marked this build flavor as incomplete.
38
- #
39
-
40
- Remove-Item - Path $Env: FlavorBuildIncompleteFile - Force
41
-
42
38
#
43
39
# Copy all logs to DropPath
44
40
#
45
41
46
- $buildlogsDropPath = Join-Path $Env: DropPath " buildlogs"
47
- $logsDropPath = Join-Path $Env: DropPath " logs"
48
- $testlogsDropPath = Join-Path $Env: DropPath " testlogs"
42
+ $logBase = Join-Path $destinationBase " logs"
43
+ $buildlogsDropPath = Join-Path $logBase " buildlogs"
44
+ $logsDropPath = Join-Path $logBase " logs"
45
+ $testlogsDropPath = Join-Path $logBase " testlogs"
49
46
50
47
New-Item - Force - ItemType Directory - Path $buildlogsDropPath
51
48
New-Item - Force - ItemType Directory - Path $logsDropPath
@@ -91,7 +88,7 @@ if ((-not $BuildSucceeded) -or (-not $TestsPassed)) {
91
88
$Status = " failed"
92
89
}
93
90
94
- $buildFlavorJsonFile = Join-Path $Env: DropPath " ${Env: BuildName} .json"
91
+ $buildFlavorJsonFile = Join-Path $logBase " ${Env: BuildName} .json"
95
92
$buildFlavorJson = New-Object System.Object
96
93
97
94
$buildFlavorJson | Add-Member - type NoteProperty - name buildName - value $Env: BuildName
@@ -122,13 +119,23 @@ Copy-Item -Verbose -Force $buildFlavorJsonFile $metadataDir
122
119
Get-ChildItem - Path (Join-Path $sourcesDir " Build" ) " *.nuspec" `
123
120
| ForEach-Object { Copy-Item - Verbose - Force $_.FullName $metadataDir }
124
121
122
+ #
123
+ # Copy binaries directory
124
+ #
125
+
126
+ $BinFolder = Join-Path $Env: BinariesDirectory " bin\${Env: BuildName} "
127
+ $BinDropPath = Join-Path $destinationBase " bin"
128
+ Write-Output " Copying `" $BinFolder `" to `" $BinDropPath `" ..."
129
+ Copy-Item - Verbose $BinFolder $BinDropPath - Recurse - Force - Exclude " *_ttdlog*"
130
+
125
131
#
126
132
# Copy POGO directory if present for this build
127
133
#
128
134
129
135
$PogoFolder = Join-Path $Env: BinariesDirectory " bin\${Env: BuildType} _pogo"
130
136
if (Test-Path $PogoFolder ) {
131
- $BinDropPath = Join-Path $Env: DropPath " bin"
132
- Write-Output " Copying `" $PogoFolder `" to `" $BinDropPath `" ..."
133
- Copy-Item - Verbose $PogoFolder $BinDropPath - Recurse - Force
137
+ $PogoBinDropPath = Join-Path $destinationBase " bin_pogo"
138
+ Write-Output " Copying `" $PogoFolder `" to `" $PogoBinDropPath `" ..."
139
+ Write-Output " ##vso[task.setvariable variable=VSO_POGOPresent;]true"
140
+ Copy-Item - Verbose $PogoFolder $PogoBinDropPath - Recurse - Force
134
141
}
0 commit comments