mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 02:11:58 +08:00
[vcpkgDependencies.xml] Reuse in bootstrap
This commit is contained in:
parent
31b27eaa1b
commit
f0cee21f7a
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user