From f0cee21f7a11c9c2073616e199b412d6fb2a364d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 22 Feb 2018 19:56:08 -0800 Subject: [PATCH] [vcpkgDependencies.xml] Reuse in bootstrap --- scripts/bootstrap.ps1 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index eb4513a647..9ee2d1643a 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -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 @@ -29,6 +35,7 @@ finally $env:path = $oldpath } Write-Verbose("Git repo version string is " + $gitHash) + $vcpkgSourcesPath = "$vcpkgRootDir\toolsrc" if (!(Test-Path $vcpkgSourcesPath))