forked from microsoft/microsoft-ui-xaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPublishSymbols.ps1
38 lines (26 loc) · 1.2 KB
/
PublishSymbols.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Push-Location $PSScriptRoot
[xml]$customProps = (Get-Content ..\..\custom.props)
$versionMajor = $customProps.GetElementsByTagName("VersionMajor").'#text'
$versionMinor = $customProps.GetElementsByTagName("VersionMinor").'#text'
if ((!$versionMajor) -or (!$versionMinor))
{
Write-Error "Expected VersionMajor and VersionMinor tags to be in custom.props file"
Exit 1
}
$buildVersion = $versionMajor + "." + $versionMinor + "." + $env:BUILD_BUILDNUMBER
Write-Host "Build = $buildVersion"
$buildId="$($env:BUILD_BUILDNUMBER)_$($env:BUILDCONFIGURATION)_$($env:BUILDPLATFORM)"
$localDirectory=$env:BUILD_BINARIESDIRECTORY + "\" + $env:BUILDCONFIGURATION + "\" + $env:BUILDPLATFORM + "\Microsoft.UI.Xaml"
$directory = "$env:XES_DFSDROP\$env:XES_RELATIVEOUTPUTROOT\Microsoft.UI.Xaml"
Write-Host "Local path: '$localDirectory'"
Write-Host "Build share: '$directory'"
Copy-Item -Recurse "$localDirectory" "$directory"
Write-Host "buildId = $buildId"
Copy-Item pdb_index_template.ini pdb_index.ini
Add-Content pdb_index.ini "Build=$buildVersion"
\\symbols\Tools\createrequest.cmd -i .\pdb_index.ini -d .\requests -c -a -b $buildId -e Release -g $directory
if ($lastexitcode -ne 0)
{
Exit $lastexitcode;
}
Pop-Location