aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-08-25 23:20:57 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-08-25 23:20:57 -0700
commit3f88832110a780de991752323cf39b8f68b34c39 (patch)
tree152c6b325aee09198ae9eb641232f378819c1e2b /scripts
parentf578dd6d072800f9e8ce11f3cc527bbe3e6c24dc (diff)
downloadvcpkg-3f88832110a780de991752323cf39b8f68b34c39.tar.gz
vcpkg-3f88832110a780de991752323cf39b8f68b34c39.zip
[vcpkg] Add commit date to vcpkg version
Diffstat (limited to 'scripts')
-rw-r--r--scripts/bootstrap.ps112
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1
index b7bc5afab..569bdbbc7 100644
--- a/scripts/bootstrap.ps1
+++ b/scripts/bootstrap.ps1
@@ -6,15 +6,21 @@ param(
$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition
$vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root
+Write-Verbose("vcpkg Path " + $vcpkgRootDir)
+
+$env:path += ";$vcpkgRootDir\downloads\MinGit-2.14.1-32-bit\cmd"
$gitHash = "unknownhash"
if (Get-Command "git" -ErrorAction SilentlyContinue)
{
- $gitHash = git rev-parse HEAD
+ $gitHash = git log HEAD -n 1 --format="%cd-%H" --date=short
+ if ($LASTEXITCODE -ne 0)
+ {
+ $gitHash = "unknownhash"
+ }
}
-Write-Verbose("Git hash is " + $gitHash)
+Write-Verbose("Git repo version string is " + $gitHash)
$vcpkgSourcesPath = "$vcpkgRootDir\toolsrc"
-Write-Verbose("vcpkg Path " + $vcpkgSourcesPath)
if (!(Test-Path $vcpkgSourcesPath))
{