Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

53 lines (48 sloc) 1.489 kb
function Get-Git-Commit
$gitLog = git log --oneline -1
return $gitLog.Split(' ')[0]
function Get-Version-From-Git-Tag
$gitTag = git describe --tags --abbrev=0
return $gitTag.Replace("v", "") + ".0"
function Generate-Assembly-Info
[string]$clsCompliant = "true",
[string]$file = $(throw "file is a required parameter.")
$commit = Get-Git-Commit
$asmInfo = "using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: CLSCompliantAttribute($clsCompliant )]
[assembly: ComVisibleAttribute(false)]
[assembly: AssemblyTitleAttribute(""$title"")]
[assembly: AssemblyDescriptionAttribute(""$description"")]
[assembly: AssemblyCompanyAttribute(""$company"")]
[assembly: AssemblyProductAttribute(""$product"")]
[assembly: AssemblyCopyrightAttribute(""$copyright"")]
[assembly: AssemblyVersionAttribute(""$version"")]
[assembly: AssemblyInformationalVersionAttribute(""$version / $commit"")]
[assembly: AssemblyFileVersionAttribute(""$version"")]
[assembly: AssemblyDelaySignAttribute(false)]
$dir = [System.IO.Path]::GetDirectoryName($file)
if ([System.IO.Directory]::Exists($dir) -eq $false)
Write-Host "Creating directory $dir"
Write-Host "Generating assembly info file: $file"
Write-Output $asmInfo > $file
Jump to Line
Something went wrong with that request. Please try again.