Skip to content
Newer
Older
100644 46 lines (43 sloc) 1.36 KB
79193bb Merge branch 'master' of git://github.com/ayende/rhino-mocks into dev
Jean-Paul S. Boodhoo authored Oct 22, 2009
1 function Get-Git-Commit
2 {
3 $gitLog = git log --oneline -1
4 return $gitLog.Split(' ')[0]
5 }
6
f5445ca Fixed a bug when using x.Stub on a class with a virtual automatic
Jean-Paul S. Boodhoo authored Sep 18, 2009
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 )
79193bb Merge branch 'master' of git://github.com/ayende/rhino-mocks into dev
Jean-Paul S. Boodhoo authored Oct 22, 2009
19 $commit = Get-Git-Commit
f5445ca Fixed a bug when using x.Stub on a class with a virtual automatic
Jean-Paul S. Boodhoo authored Sep 19, 2009
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"")]
79193bb Merge branch 'master' of git://github.com/ayende/rhino-mocks into dev
Jean-Paul S. Boodhoo authored Oct 22, 2009
33 [assembly: AssemblyInformationalVersionAttribute(""$version / $commit"")]
f5445ca Fixed a bug when using x.Stub on a class with a virtual automatic
Jean-Paul S. Boodhoo authored Sep 19, 2009
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"
79193bb Merge branch 'master' of git://github.com/ayende/rhino-mocks into dev
Jean-Paul S. Boodhoo authored Oct 22, 2009
45 out-file -filePath $file -encoding UTF8 -inputObject $asmInfo
08baaea @ayende Restructoring the project to be a stand alone one
authored Aug 29, 2009
46 }
Something went wrong with that request. Please try again.