diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2016-09-19 18:46:02 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2016-09-19 18:52:17 -0700 |
| commit | b9a0cee78d01df2a879dee3e4e01800fb3cf3391 (patch) | |
| tree | 743d3a1175df2105929cf335419c910439ee2204 /scripts/doVcpkgRelease.ps1 | |
| parent | 31e7e219211a17b4c133387bfde77861674776f6 (diff) | |
| download | vcpkg-b9a0cee78d01df2a879dee3e4e01800fb3cf3391.tar.gz vcpkg-b9a0cee78d01df2a879dee3e4e01800fb3cf3391.zip | |
Powershell scripts now detect the root dir via the .vcpkg-root file
Diffstat (limited to 'scripts/doVcpkgRelease.ps1')
| -rw-r--r-- | scripts/doVcpkgRelease.ps1 | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/scripts/doVcpkgRelease.ps1 b/scripts/doVcpkgRelease.ps1 index 935eea031..3b3021286 100644 --- a/scripts/doVcpkgRelease.ps1 +++ b/scripts/doVcpkgRelease.ps1 @@ -25,11 +25,12 @@ if ($matchingTags.Length -gt 0) $gitHash = git rev-parse HEAD Write-Verbose("Git hash is " + $gitHash) -$vcpkgPath = (get-item $PSScriptRoot).parent.FullName +$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition +$vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root $gitStartOfHash = $gitHash.substring(0,6) $versionWithStartOfHash = "$version-$gitStartOfHash" -$buildPath = "$vcpkgPath\build-$versionWithStartOfHash" -$releasePath = "$vcpkgPath\release-$versionWithStartOfHash" +$buildPath = "$vcpkgRootDir\build-$versionWithStartOfHash" +$releasePath = "$vcpkgRootDir\release-$versionWithStartOfHash" Write-Verbose("Build Path " + $buildPath) Write-Verbose("Release Path " + $releasePath) @@ -48,7 +49,7 @@ for ($disableMetrics = 0; $disableMetrics -le 1; $disableMetrics++) } # Partial checkout for building vcpkg - $dotGitDir = "$vcpkgPath\.git" + $dotGitDir = "$vcpkgRootDir\.git" $workTreeForBuildOnly = "$buildPath" $checkoutThisDirForBuildOnly1 = ".\scripts" # Must be relative to the root of the repository $checkoutThisDirForBuildOnly2 = ".\toolsrc" # Must be relative to the root of the repository @@ -68,10 +69,10 @@ for ($disableMetrics = 0; $disableMetrics -le 1; $disableMetrics++) Copy-Item $buildPath\scripts\vcpkgmetricsuploader.exe $releasePath\scripts\vcpkgmetricsuploader.exe | Out-Null Write-Verbose("Archiving") - $outputArchive = "$vcpkgPath\vcpkg-$versionWithStartOfHash.zip" + $outputArchive = "$vcpkgRootDir\vcpkg-$versionWithStartOfHash.zip" if ($disableMetrics -ne 0) { - $outputArchive = "$vcpkgPath\vcpkg-$versionWithStartOfHash-external.zip" + $outputArchive = "$vcpkgRootDir\vcpkg-$versionWithStartOfHash-external.zip" } Compress-Archive -Path "$releasePath\*" -CompressionLevel Optimal -DestinationPath $outputArchive -Force | Out-Null |
