Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 46 lines (43 sloc) 1.365 kB
b6f8aa2 @ShawnSpooner Adding a Guid extension to messages that are copied to the log endpoint
ShawnSpooner authored
1 function Get-Git-Commit
2 {
3 $gitLog = git log --oneline -1
4 return $gitLog.Split(' ')[0]
5 }
6
7 function Generate-Assembly-Info
8 {
9 param(
10 [string]$clsCompliant = "true",
11 [string]$title,
12 [string]$description,
13 [string]$company,
14 [string]$product,
15 [string]$copyright,
16 [string]$version,
17 [string]$file = $(throw "file is a required parameter.")
18 )
19 $commit = Get-Git-Commit
20 $asmInfo = "using System;
21 using System.Reflection;
22 using System.Runtime.CompilerServices;
23 using System.Runtime.InteropServices;
24
25 [assembly: CLSCompliantAttribute($clsCompliant )]
26 [assembly: ComVisibleAttribute(false)]
27 [assembly: AssemblyTitleAttribute(""$title"")]
28 [assembly: AssemblyDescriptionAttribute(""$description"")]
29 [assembly: AssemblyCompanyAttribute(""$company"")]
30 [assembly: AssemblyProductAttribute(""$product"")]
31 [assembly: AssemblyCopyrightAttribute(""$copyright"")]
32 [assembly: AssemblyVersionAttribute(""$version"")]
33 [assembly: AssemblyInformationalVersionAttribute(""$version / $commit"")]
34 [assembly: AssemblyFileVersionAttribute(""$version"")]
35 [assembly: AssemblyDelaySignAttribute(false)]
36 "
37
38 $dir = [System.IO.Path]::GetDirectoryName($file)
39 if ([System.IO.Directory]::Exists($dir) -eq $false)
40 {
41 Write-Host "Creating directory $dir"
42 [System.IO.Directory]::CreateDirectory($dir)
43 }
44 Write-Host "Generating assembly info file: $file"
45 Write-Output $asmInfo > $file
210d047 @ayende Moving to psake
ayende authored
46 }
Something went wrong with that request. Please try again.