2019-12-13 09:48:00 -05:00
|
|
|
################################################################################
|
|
|
|
|
## File: Validate-Boost.ps1
|
|
|
|
|
## Desc: Validate Boost
|
|
|
|
|
################################################################################
|
|
|
|
|
|
2020-03-17 09:47:22 +03:00
|
|
|
Import-Module -Name ImageHelpers
|
|
|
|
|
|
2019-12-13 09:48:00 -05:00
|
|
|
function Validate-BoostVersion
|
|
|
|
|
{
|
|
|
|
|
Param
|
|
|
|
|
(
|
|
|
|
|
[String]$BoostRootPath,
|
|
|
|
|
[String]$BoostRelease
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
$ReleasePath = Join-Path -Path $BoostRootPath -ChildPath $BoostRelease
|
|
|
|
|
|
2020-01-29 10:41:09 +03:00
|
|
|
if (Test-Path "$ReleasePath\b2.exe")
|
2019-12-13 09:48:00 -05:00
|
|
|
{
|
|
|
|
|
Write-Host "Boost.Build $BoostRelease is successfully installed"
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Write-Host "$BoostRelease not found"
|
|
|
|
|
exit 1
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-17 09:47:22 +03:00
|
|
|
$SoftwareName = 'Boost'
|
|
|
|
|
$BoostRootDirectory = Join-Path -Path $env:AGENT_TOOLSDIRECTORY -ChildPath $SoftwareName
|
|
|
|
|
$BoostTools = Get-ToolsByName -SoftwareName $SoftwareName
|
2019-12-13 09:48:00 -05:00
|
|
|
|
2020-03-17 09:47:22 +03:00
|
|
|
foreach ($BoostTool in $BoostTools)
|
2019-12-13 09:48:00 -05:00
|
|
|
{
|
2020-03-17 09:47:22 +03:00
|
|
|
$BoostVersionsToInstall = $BoostTool.Versions | Foreach-Object {"{0}.0" -f $_}
|
|
|
|
|
foreach($BoostVersion in $BoostVersionsToInstall)
|
|
|
|
|
{
|
|
|
|
|
Validate-BoostVersion -BoostRootPath $BoostRootDirectory -BoostRelease $BoostVersion
|
2019-12-13 09:48:00 -05:00
|
|
|
}
|
|
|
|
|
}
|