Skip to content

Commit

Permalink
[vcpkgDependencies.xml] Reuse in bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkaratarakis committed Feb 24, 2018
1 parent 31b27ea commit f0cee21
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ $gitHash = "unknownhash"
$oldpath = $env:path
try
{
$env:path += ";$vcpkgRootDir\downloads\MinGit-2.16.2-32-bit\cmd"
[xml]$asXml = Get-Content "$scriptsDir\vcpkgDependencies.xml"
$dependencyData = $asXml.SelectSingleNode("//dependencies/dependency[@name=`"git`"]")
$postExtractionExecutableRelativePath = $dependencyData.postExtractionExecutableRelativePath
$gitFromDownload = "$vcpkgRootDir\downloads\$postExtractionExecutableRelativePath"
$gitDir = split-path -parent $gitFromDownload

$env:path += ";$gitDir"
if (Get-Command "git" -ErrorAction SilentlyContinue)
{
$gitHash = git log HEAD -n 1 --format="%cd-%H" --date=short
Expand All @@ -29,6 +35,7 @@ finally
$env:path = $oldpath
}
Write-Verbose("Git repo version string is " + $gitHash)

$vcpkgSourcesPath = "$vcpkgRootDir\toolsrc"

if (!(Test-Path $vcpkgSourcesPath))
Expand Down

0 comments on commit f0cee21

Please sign in to comment.