Skip to content
Newer
Older
100644 53 lines (48 sloc) 1.45 KB
b6f8aa2 @ShawnSpooner Adding a Guid extension to messages that are copied to the log endpoint
ShawnSpooner authored Apr 12, 2010
1 function Get-Git-Commit
2 {
3 $gitLog = git log --oneline -1
4 return $gitLog.Split(' ')[0]
5 }
6
584a125 @CoreyKaylor Updated build script to pull version from latest git tag.
CoreyKaylor authored Jul 9, 2011
7 function Get-Version-From-Git-Tag
8 {
9 $gitTag = git describe --tags --abbrev=0
10 return $gitTag.Replace("v", "") + ".0"
11 }
12
b6f8aa2 @ShawnSpooner Adding a Guid extension to messages that are copied to the log endpoint
ShawnSpooner authored Apr 13, 2010
13 function Generate-Assembly-Info
14 {
15 param(
16 [string]$clsCompliant = "true",
17 [string]$title,
18 [string]$description,
19 [string]$company,
20 [string]$product,
21 [string]$copyright,
22 [string]$version,
23 [string]$file = $(throw "file is a required parameter.")
24 )
25 $commit = Get-Git-Commit
26 $asmInfo = "using System;
27 using System.Reflection;
28 using System.Runtime.CompilerServices;
29 using System.Runtime.InteropServices;
30
31 [assembly: CLSCompliantAttribute($clsCompliant )]
32 [assembly: ComVisibleAttribute(false)]
33 [assembly: AssemblyTitleAttribute(""$title"")]
34 [assembly: AssemblyDescriptionAttribute(""$description"")]
35 [assembly: AssemblyCompanyAttribute(""$company"")]
36 [assembly: AssemblyProductAttribute(""$product"")]
37 [assembly: AssemblyCopyrightAttribute(""$copyright"")]
38 [assembly: AssemblyVersionAttribute(""$version"")]
39 [assembly: AssemblyInformationalVersionAttribute(""$version / $commit"")]
40 [assembly: AssemblyFileVersionAttribute(""$version"")]
41 [assembly: AssemblyDelaySignAttribute(false)]
42 "
43
44 $dir = [System.IO.Path]::GetDirectoryName($file)
45 if ([System.IO.Directory]::Exists($dir) -eq $false)
46 {
47 Write-Host "Creating directory $dir"
48 [System.IO.Directory]::CreateDirectory($dir)
49 }
50 Write-Host "Generating assembly info file: $file"
51 Write-Output $asmInfo > $file
584a125 @CoreyKaylor Updated build script to pull version from latest git tag.
CoreyKaylor authored Jul 9, 2011
52 }
Something went wrong with that request. Please try again.