Skip to content
Newer
Older
100644 122 lines (105 sloc) 3.86 KB
ecf7f74 @HEskandari Added dialog support
HEskandari authored Aug 13, 2010
1 properties {
2 $base_dir = resolve-path .
3 $lib_dir = "$base_dir\SharedLibs"
4 $build_dir = "$base_dir\build"
5 $buildartifacts_dir = "$build_dir\"
6 $sln_file = "$base_dir\Rhino.Licensing.sln"
7 $version = "1.2.0.0"
8 $humanReadableversion = "1.2"
9 $tools_dir = "$base_dir\Tools"
10 $release_dir = "$base_dir\Release"
11 $uploadCategory = "Rhino-Mocks"
12 $uploadScript = "C:\Builds\Upload\PublishBuild.build"
13 }
14
15 include .\psake_ext.ps1
16
17 task default -depends Release
18
19 task Clean {
20 remove-item -force -recurse $buildartifacts_dir -ErrorAction SilentlyContinue
21 remove-item -force -recurse $release_dir -ErrorAction SilentlyContinue
22 }
23
24 task Init -depends Clean {
25
26 Generate-Assembly-Info `
27 -file "$base_dir\Rhino.Licensing\Properties\AssemblyInfo.cs" `
28 -title "Rhino Licensing $version" `
29 -description "Licensing Framework for .NET" `
30 -company "Hibernating Rhinos" `
31 -product "Rhino Licensing $version" `
32 -version $version `
33 -copyright "Hibernating Rhinos & Ayende Rahien 2004 - 2009"
34
35 Generate-Assembly-Info `
36 -file "$base_dir\Rhino.Licensing.Tests\Properties\AssemblyInfo.cs" `
37 -title "Rhino Licensing $version" `
38 -description "Licensing Framework for .NET" `
39 -company "Hibernating Rhinos" `
40 -product "Rhino Licensing $version" `
41 -version $version `
42 -copyright "Hibernating Rhinos & Ayende Rahien 2004 - 2009"
43
44 Generate-Assembly-Info `
45 -file "$base_dir\Rhino.Licensing.AdminTool\Properties\AssemblyInfo.cs" `
46 -title "Rhino Licensing $version" `
47 -description "Licensing Framework for .NET" `
48 -company "Hibernating Rhinos" `
49 -product "Rhino Licensing $version" `
50 -version $version `
51 -copyright "Hibernating Rhinos & Ayende Rahien 2004 - 2009"
52
53 Generate-Assembly-Info `
54 -file "$base_dir\Rhino.Licensing.AdminTool.Tests\Properties\AssemblyInfo.cs" `
55 -title "Rhino Licensing $version" `
56 -description "Licensing Framework for .NET" `
57 -company "Hibernating Rhinos" `
58 -product "Rhino Licensing $version" `
59 -version $version `
f279d45 @HEskandari Refactored dialogs
HEskandari authored Aug 30, 2010
60 -clsCompliant "false" `
ecf7f74 @HEskandari Added dialog support
HEskandari authored Aug 13, 2010
61 -copyright "Hibernating Rhinos & Ayende Rahien 2004 - 2009"
62
63 new-item $release_dir -itemType directory
64 new-item $buildartifacts_dir -itemType directory
65 cp $tools_dir\xunit\*.* $build_dir
66 }
67
68 task Compile -depends Init {
69 exec msbuild "/p:OutDir=""$buildartifacts_dir "" $sln_file"
70 }
71
72 task Test -depends Compile {
73 $old = pwd
74 cd $build_dir
75 exec "$tools_dir\xUnit\xunit.console.exe" "$build_dir\Rhino.Licensing.Tests.dll"
76 exec "$tools_dir\xUnit\xunit.console.exe" "$build_dir\Rhino.Licensing.AdminTool.Tests.dll"
77 cd $old
78 }
79
80
81 task Release -depends Test {
82 & $tools_dir\zip.exe -9 -A -j `
83 $release_dir\Rhino.Licensing-$humanReadableversion-Build-$env:ccnetnumericlabel.zip `
84 $build_dir\Rhino.Licensing.dll `
85 $build_dir\Rhino.Licensing.xml `
86 license.txt `
87 acknowledgements.txt
88
89 & $tools_dir\zip.exe -9 -A -j `
90 $release_dir\Rhino.Licensing-AdminTool-$humanReadableversion-Build-$env:ccnetnumericlabel.zip `
91 $build_dir\Caliburn.Core.dll `
92 $build_dir\Caliburn.PresentationFramework.dll `
93 $build_dir\Caliburn.ShellFramework.dll `
94 $build_dir\Caliburn.Windsor.dll `
95 $build_dir\Castle.Core.dll `
96 $build_dir\Castle.DynamicProxy2.dll `
97 $build_dir\Castle.MicroKernel.dll `
98 $build_dir\Castle.Windsor.dll `
99 $build_dir\log4net.dll `
100 $build_dir\Microsoft.Practices.ServiceLocation.dll `
101 $build_dir\Rhino.Licensing.AdminTool.exe `
102 license.txt `
103 acknowledgements.txt
104
105 if ($lastExitCode -ne 0) {
106 throw "Error: Failed to execute ZIP command"
107 }
108 }
109
110 task Upload -depend Release {
111 if (Test-Path $uploadScript ) {
112 $log = git log -n 1 --oneline
113 msbuild $uploadScript /p:Category=$uploadCategory "/p:Comment=$log" "/p:File=$release_dir\Rhino.Mocks-$humanReadableversion-Build-$env:ccnetnumericlabel.zip"
114
115 if ($lastExitCode -ne 0) {
116 throw "Error: Failed to publish build"
117 }
118 }
119 else {
120 Write-Host "could not find upload script $uploadScript, skipping upload"
121 }
85ce9e7 @HEskandari admin tool project structure
HEskandari authored Aug 5, 2010
122 }
Something went wrong with that request. Please try again.