Permalink
Browse files

Adding git commit to the generated output

  • Loading branch information...
1 parent f4d383f commit b2e2fb511b7a39e6795471921bd31e13d654a0e7 @ayende committed Sep 26, 2009
Showing with 8 additions and 2 deletions.
  1. +8 −2 psake_ext.ps1
View
@@ -1,3 +1,9 @@
+function Get-Git-Commit
+{
+ $gitLog = git log --oneline -1
+ return $gitLog.Split(' ')[0]
+}
+
function Generate-Assembly-Info
{
param(
@@ -10,7 +16,7 @@ param(
[string]$version,
[string]$file = $(throw "file is a required parameter.")
)
-
+ $commit = Get-Git-Commit
$asmInfo = "using System;
using System.Reflection;
using System.Runtime.CompilerServices;
@@ -24,7 +30,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyProductAttribute(""$product"")]
[assembly: AssemblyCopyrightAttribute(""$copyright"")]
[assembly: AssemblyVersionAttribute(""$version"")]
-[assembly: AssemblyInformationalVersionAttribute(""$version"")]
+[assembly: AssemblyInformationalVersionAttribute(""$version / $commit"")]
[assembly: AssemblyFileVersionAttribute(""$version"")]
[assembly: AssemblyDelaySignAttribute(false)]
"

0 comments on commit b2e2fb5

Please sign in to comment.