From 2319b3d20137646763e3254992cd3ad3d57b5c91 Mon Sep 17 00:00:00 2001 From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch> Date: Tue, 27 Feb 2018 18:37:30 +0100 Subject: [PATCH] Provide a dot-formatted variant of the build-date. Useful in combination with the AssemblyInformationalVersion property. --- Scripts/Prepare-Build.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Scripts/Prepare-Build.ps1 b/Scripts/Prepare-Build.ps1 index f7dd9de..5495f40 100644 --- a/Scripts/Prepare-Build.ps1 +++ b/Scripts/Prepare-Build.ps1 @@ -91,6 +91,11 @@ catch { $Date = Get-Date -Format 'yyyy-MM-dd HH:mm:ss' +# the dotted short format can be used in the AssemblyInformationalVersion +# property, as this will magically be parsed and reported as "Version" when +# examining the executable using "Get-Command AutoTx.exe | Format-List *" +$DateShort = Get-Date -Format 'yyyy.MM.dd.HHmm' + $BCommit = "$($SolutionDir)\Resources\BuildCommit.txt" $BuildDate = "$($SolutionDir)\Resources\BuildDate.txt" @@ -109,6 +114,6 @@ Write-Output $( "git-describe: [$($CommitName)]$($StatusWarning)" ) -Write-BuildDetails $BuildDetailsCS $DescItems $GitBranch $Date +Write-BuildDetails $BuildDetailsCS $DescItems $GitBranch $DateShort cd $oldpwd \ No newline at end of file -- GitLab