Skip to content
Snippets Groups Projects
Commit cb0aef8d authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Output cosmetics and syntax consistency.

parent 33e60370
Branches
Tags
No related merge requests found
...@@ -34,8 +34,7 @@ function Write-BuildDetails { ...@@ -34,8 +34,7 @@ function Write-BuildDetails {
$CommitName = "$($Desc[0]).$($Desc[1])-$($Desc[2])-$($Desc[3])" $CommitName = "$($Desc[0]).$($Desc[1])-$($Desc[2])-$($Desc[3])"
$Commit = $Desc[3].Substring(1) $Commit = $Desc[3].Substring(1)
Write-Output "Generating [$($Target)]..." Write-Output "$($Target.Substring($Target.LastIndexOf('\')+1)) -> $($Target)"
Write-Output " > $($CommitName)"
$Code = $CsTemplate -f ` $Code = $CsTemplate -f `
$CommitName, ` $CommitName, `
$Branch, ` $Branch, `
...@@ -44,7 +43,7 @@ function Write-BuildDetails { ...@@ -44,7 +43,7 @@ function Write-BuildDetails {
$Desc[2], ` $Desc[2], `
$Date, ` $Date, `
$Commit $Commit
Write-Verbose $Code Write-Verbose "/// generated code ///`n$($Code)`n/// generated code ///`n"
Out-File -FilePath $Target -Encoding ASCII -InputObject $Code Out-File -FilePath $Target -Encoding ASCII -InputObject $Code
} }
...@@ -64,8 +63,8 @@ function Parse-GitDescribe([string]$CommitName) { ...@@ -64,8 +63,8 @@ function Parse-GitDescribe([string]$CommitName) {
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
$oldpwd = pwd $OldLocation = Get-Location
cd $SolutionDir -ErrorAction Stop Set-Location $SolutionDir -ErrorAction Stop
try { try {
$CommitName = & git describe --tags --long --match "[0-9].[0-9]" $CommitName = & git describe --tags --long --match "[0-9].[0-9]"
...@@ -116,4 +115,4 @@ Write-Output $( ...@@ -116,4 +115,4 @@ Write-Output $(
Write-BuildDetails $BuildDetailsCS $DescItems $GitBranch $DateShort Write-BuildDetails $BuildDetailsCS $DescItems $GitBranch $DateShort
cd $oldpwd Set-Location $OldLocation
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment