mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Get GitCommitId using the ProductVersion from Assembly (#5651)
This commit is contained in:
committed by
Travis Plunk
parent
24298f76f5
commit
0bcc2a2a8f
@@ -241,8 +241,11 @@ try
|
||||
}
|
||||
|
||||
# grab the commitID, we need this to grab the right sources
|
||||
$gitCommitId = & "$psBinPath\pwsh.exe" -noprofile -command { $PSVersiontable.GitCommitId }
|
||||
$commitId = $gitCommitId.substring($gitCommitId.LastIndexOf('-g') + 2)
|
||||
$assemblyLocation = & "$psBinPath\pwsh.exe" -noprofile -command { Get-Item ([psobject].Assembly.Location) }
|
||||
$productVersion = $assemblyLocation.VersionInfo.productVersion
|
||||
$commitId = $productVersion.split(" ")[-1]
|
||||
|
||||
Write-LogPassThru -Message "Using GitCommitId: $commitId"
|
||||
|
||||
# download the src directory
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user