Skip to content
Browse files

Updated psake. Updated Castle. Updated build to output both 3.5 and 4…

….0. Increased version on projects to 4.0. Changed reference path for lib to account for multiple framework versions. This means under VS will always build under 4.0, but tests and build for 3.5 will still happen through build scripts.
  • Loading branch information...
1 parent ed5fa25 commit b8ba8183997e22d1dc322e2d99fadc135b3ba56d @CoreyKaylor CoreyKaylor committed
Showing with 86,327 additions and 13,339 deletions.
  1. +4 −4 Rhino.ServiceBus.Host/Rhino.ServiceBus.Host.csproj
  2. +20 −28 Rhino.ServiceBus.Tests/Rhino.ServiceBus.Tests.csproj
  3. 0 {SharedLibs → Rhino.ServiceBus}/Castle.Core.dll
  4. 0 {SharedLibs → Rhino.ServiceBus}/Castle.Core.pdb
  5. +4,927 −4,927 {SharedLibs → Rhino.ServiceBus}/Castle.Core.xml
  6. 0 {SharedLibs → Rhino.ServiceBus}/Castle.Windsor.dll
  7. 0 {SharedLibs → Rhino.ServiceBus}/Castle.Windsor.pdb
  8. +7,746 −7,746 {SharedLibs → Rhino.ServiceBus}/Castle.Windsor.xml
  9. BIN Rhino.ServiceBus/Esent.Interop.dll
  10. BIN Rhino.ServiceBus/Esent.Interop.pdb
  11. +15,558 −0 Rhino.ServiceBus/Esent.Interop.xml
  12. 0 {SharedLibs → Rhino.ServiceBus}/Rhino.PersistentHashTable.dll
  13. 0 {SharedLibs → Rhino.ServiceBus}/Rhino.PersistentHashTable.pdb
  14. 0 {SharedLibs → Rhino.ServiceBus}/Rhino.Queues.dll
  15. 0 {SharedLibs → Rhino.ServiceBus}/Rhino.Queues.pdb
  16. +14 −19 Rhino.ServiceBus/Rhino.ServiceBus.csproj
  17. BIN Rhino.ServiceBus/Wintellect.Threading.dll
  18. +3,330 −0 Rhino.ServiceBus/Wintellect.Threading.xml
  19. BIN Rhino.ServiceBus/log4net.dll
  20. +28,655 −0 Rhino.ServiceBus/log4net.xml
  21. +8 −10 Samples/Starbucks.Tests/Starbucks.Tests.csproj
  22. +10 −13 Samples/Starbucks/Starbucks.csproj
  23. BIN SharedLibs/3.5/Castle.Core.dll
  24. BIN SharedLibs/3.5/Castle.Core.pdb
  25. +4,927 −0 SharedLibs/3.5/Castle.Core.xml
  26. BIN SharedLibs/3.5/Castle.Windsor.dll
  27. BIN SharedLibs/3.5/Castle.Windsor.pdb
  28. +7,741 −0 SharedLibs/3.5/Castle.Windsor.xml
  29. BIN SharedLibs/3.5/Rhino.PersistentHashTable.dll
  30. BIN SharedLibs/3.5/Rhino.PersistentHashTable.pdb
  31. BIN SharedLibs/3.5/Rhino.Queues.dll
  32. BIN SharedLibs/3.5/Rhino.Queues.pdb
  33. BIN SharedLibs/4.0/Castle.Core.dll
  34. BIN SharedLibs/4.0/Castle.Core.pdb
  35. +4,927 −0 SharedLibs/4.0/Castle.Core.xml
  36. BIN SharedLibs/4.0/Castle.Windsor.dll
  37. BIN SharedLibs/4.0/Castle.Windsor.pdb
  38. +7,741 −0 SharedLibs/4.0/Castle.Windsor.xml
  39. BIN SharedLibs/4.0/Rhino.PersistentHashTable.dll
  40. BIN SharedLibs/4.0/Rhino.PersistentHashTable.pdb
  41. BIN SharedLibs/4.0/Rhino.Queues.dll
  42. BIN SharedLibs/4.0/Rhino.Queues.pdb
  43. +108 −0 build.ps1
  44. +0 −3 build_release_4.ps1
  45. +12 −101 default.ps1
  46. +29 −5 psake.ps1
  47. +569 −481 psake.psm1
  48. +1 −2 readme.md
View
8 Rhino.ServiceBus.Host/Rhino.ServiceBus.Host.csproj
@@ -10,10 +10,11 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Rhino.ServiceBus.Host</RootNamespace>
<AssemblyName>Rhino.ServiceBus.Host</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\ayende-open-source.snk</AssemblyOriginatorKeyFile>
+ <TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -33,9 +34,8 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\log4net.dll</HintPath>
+ <Reference Include="log4net">
+ <HintPath>..\SharedLibs\build\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration.Install" />
View
48 Rhino.ServiceBus.Tests/Rhino.ServiceBus.Tests.csproj
@@ -10,10 +10,11 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Rhino.ServiceBus.Tests</RootNamespace>
<AssemblyName>Rhino.ServiceBus.Tests</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\ayende-open-source.snk</AssemblyOriginatorKeyFile>
+ <TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -33,33 +34,26 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Castle.Core, Version=1.2.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\Castle.Core.dll</HintPath>
+ <Reference Include="Castle.Core">
+ <HintPath>..\SharedLibs\build\Castle.Core.dll</HintPath>
</Reference>
- <Reference Include="Castle.Windsor, Version=2.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\Castle.Windsor.dll</HintPath>
+ <Reference Include="Castle.Windsor">
+ <HintPath>..\SharedLibs\build\Castle.Windsor.dll</HintPath>
</Reference>
- <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\log4net.dll</HintPath>
+ <Reference Include="log4net">
+ <HintPath>..\SharedLibs\build\log4net.dll</HintPath>
</Reference>
- <Reference Include="Rhino.DistributedHashTable.Client, Version=1.7.0.0, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\Rhino.DistributedHashTable.Client.dll</HintPath>
+ <Reference Include="Rhino.DistributedHashTable">
+ <HintPath>..\SharedLibs\build\Rhino.DistributedHashTable.dll</HintPath>
</Reference>
- <Reference Include="Rhino.Mocks, Version=3.6.0.0, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\Rhino.Mocks.dll</HintPath>
+ <Reference Include="Rhino.Mocks">
+ <HintPath>..\SharedLibs\build\Rhino.Mocks.dll</HintPath>
</Reference>
- <Reference Include="Rhino.PersistentHashTable, Version=1.7.0.0, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\Rhino.PersistentHashTable.dll</HintPath>
+ <Reference Include="Rhino.PersistentHashTable">
+ <HintPath>..\SharedLibs\build\Rhino.PersistentHashTable.dll</HintPath>
</Reference>
- <Reference Include="Rhino.Queues, Version=1.2.0.0, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\Rhino.Queues.dll</HintPath>
+ <Reference Include="Rhino.Queues">
+ <HintPath>..\SharedLibs\build\Rhino.Queues.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
@@ -76,13 +70,11 @@
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml" />
- <Reference Include="xunit, Version=1.1.0.1323, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\xunit.dll</HintPath>
+ <Reference Include="xunit">
+ <HintPath>..\SharedLibs\build\xunit.dll</HintPath>
</Reference>
- <Reference Include="xunit.extensions, Version=1.1.0.1323, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\xunit.extensions.dll</HintPath>
+ <Reference Include="xunit.extensions">
+ <HintPath>..\SharedLibs\build\xunit.extensions.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
View
0 SharedLibs/Castle.Core.dll → Rhino.ServiceBus/Castle.Core.dll
File renamed without changes.
View
0 SharedLibs/Castle.Core.pdb → Rhino.ServiceBus/Castle.Core.pdb
File renamed without changes.
View
9,854 SharedLibs/Castle.Core.xml → Rhino.ServiceBus/Castle.Core.xml
4,927 additions, 4,927 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
0 SharedLibs/Castle.Windsor.dll → Rhino.ServiceBus/Castle.Windsor.dll
File renamed without changes.
View
0 SharedLibs/Castle.Windsor.pdb → Rhino.ServiceBus/Castle.Windsor.pdb
File renamed without changes.
View
15,492 SharedLibs/Castle.Windsor.xml → Rhino.ServiceBus/Castle.Windsor.xml
7,746 additions, 7,746 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
BIN Rhino.ServiceBus/Esent.Interop.dll
Binary file not shown.
View
BIN Rhino.ServiceBus/Esent.Interop.pdb
Binary file not shown.
View
15,558 Rhino.ServiceBus/Esent.Interop.xml
15,558 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
0 SharedLibs/Rhino.PersistentHashTable.dll → ....ServiceBus/Rhino.PersistentHashTable.dll
File renamed without changes.
View
0 SharedLibs/Rhino.PersistentHashTable.pdb → ....ServiceBus/Rhino.PersistentHashTable.pdb
File renamed without changes.
View
0 SharedLibs/Rhino.Queues.dll → Rhino.ServiceBus/Rhino.Queues.dll
File renamed without changes.
View
0 SharedLibs/Rhino.Queues.pdb → Rhino.ServiceBus/Rhino.Queues.pdb
File renamed without changes.
View
33 Rhino.ServiceBus/Rhino.ServiceBus.csproj
@@ -10,10 +10,11 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Rhino.ServiceBus</RootNamespace>
<AssemblyName>Rhino.ServiceBus</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\ayende-open-source.snk</AssemblyOriginatorKeyFile>
+ <TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -35,29 +36,23 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Castle.Core, Version=1.2.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\Castle.Core.dll</HintPath>
+ <Reference Include="Castle.Core">
+ <HintPath>..\SharedLibs\build\Castle.Core.dll</HintPath>
</Reference>
- <Reference Include="Castle.Windsor, Version=2.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\Castle.Windsor.dll</HintPath>
+ <Reference Include="Castle.Windsor">
+ <HintPath>..\SharedLibs\build\Castle.Windsor.dll</HintPath>
</Reference>
- <Reference Include="Esent.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b93b4ad6c4b80595, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\Esent.Interop.dll</HintPath>
+ <Reference Include="Esent.Interop">
+ <HintPath>..\SharedLibs\build\Esent.Interop.dll</HintPath>
</Reference>
- <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\log4net.dll</HintPath>
+ <Reference Include="log4net">
+ <HintPath>..\SharedLibs\build\log4net.dll</HintPath>
</Reference>
- <Reference Include="Rhino.PersistentHashTable, Version=1.7.0.0, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\Rhino.PersistentHashTable.dll</HintPath>
+ <Reference Include="Rhino.PersistentHashTable">
+ <HintPath>..\SharedLibs\build\Rhino.PersistentHashTable.dll</HintPath>
</Reference>
- <Reference Include="Rhino.Queues, Version=1.2.0.0, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\Rhino.Queues.dll</HintPath>
+ <Reference Include="Rhino.Queues">
+ <HintPath>..\SharedLibs\build\Rhino.Queues.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
View
BIN Rhino.ServiceBus/Wintellect.Threading.dll
Binary file not shown.
View
3,330 Rhino.ServiceBus/Wintellect.Threading.xml
3,330 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
BIN Rhino.ServiceBus/log4net.dll
Binary file not shown.
View
28,655 Rhino.ServiceBus/log4net.xml
28,655 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
18 Samples/Starbucks.Tests/Starbucks.Tests.csproj
@@ -10,8 +10,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Starbucks.Tests</RootNamespace>
<AssemblyName>Starbucks.Tests</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
+ <TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -31,13 +32,11 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Castle.Core, Version=1.2.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\SharedLibs\Castle.Core.dll</HintPath>
+ <Reference Include="Castle.Core">
+ <HintPath>..\..\SharedLibs\build\Castle.Core.dll</HintPath>
</Reference>
- <Reference Include="Castle.Windsor, Version=2.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\SharedLibs\Castle.Windsor.dll</HintPath>
+ <Reference Include="Castle.Windsor">
+ <HintPath>..\..\SharedLibs\build\Castle.Windsor.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
@@ -51,9 +50,8 @@
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
- <Reference Include="xunit, Version=1.1.0.1323, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\SharedLibs\xunit.dll</HintPath>
+ <Reference Include="xunit">
+ <HintPath>..\..\SharedLibs\build\xunit.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
View
23 Samples/Starbucks/Starbucks.csproj
@@ -10,8 +10,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Starbucks</RootNamespace>
<AssemblyName>Starbucks</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
+ <TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -31,21 +32,17 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Castle.Core, Version=1.2.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\SharedLibs\Castle.Core.dll</HintPath>
+ <Reference Include="Castle.Core">
+ <HintPath>..\..\SharedLibs\build\Castle.Core.dll</HintPath>
</Reference>
- <Reference Include="Castle.Windsor, Version=2.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\SharedLibs\Castle.Windsor.dll</HintPath>
+ <Reference Include="Castle.Windsor">
+ <HintPath>..\..\SharedLibs\build\Castle.Windsor.dll</HintPath>
</Reference>
- <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\SharedLibs\log4net.dll</HintPath>
+ <Reference Include="log4net">
+ <HintPath>..\..\SharedLibs\build\log4net.dll</HintPath>
</Reference>
- <Reference Include="Rhino.Queues, Version=1.2.0.0, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\SharedLibs\Rhino.Queues.dll</HintPath>
+ <Reference Include="Rhino.Queues">
+ <HintPath>..\..\SharedLibs\build\Rhino.Queues.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
View
BIN SharedLibs/3.5/Castle.Core.dll
Binary file not shown.
View
BIN SharedLibs/3.5/Castle.Core.pdb
Binary file not shown.
View
4,927 SharedLibs/3.5/Castle.Core.xml
4,927 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
BIN SharedLibs/3.5/Castle.Windsor.dll
Binary file not shown.
View
BIN SharedLibs/3.5/Castle.Windsor.pdb
Binary file not shown.
View
7,741 SharedLibs/3.5/Castle.Windsor.xml
7,741 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
BIN SharedLibs/3.5/Rhino.PersistentHashTable.dll
Binary file not shown.
View
BIN SharedLibs/3.5/Rhino.PersistentHashTable.pdb
Binary file not shown.
View
BIN SharedLibs/3.5/Rhino.Queues.dll
Binary file not shown.
View
BIN SharedLibs/3.5/Rhino.Queues.pdb
Binary file not shown.
View
BIN SharedLibs/4.0/Castle.Core.dll
Binary file not shown.
View
BIN SharedLibs/4.0/Castle.Core.pdb
Binary file not shown.
View
4,927 SharedLibs/4.0/Castle.Core.xml
4,927 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
BIN SharedLibs/4.0/Castle.Windsor.dll
Binary file not shown.
View
BIN SharedLibs/4.0/Castle.Windsor.pdb
Binary file not shown.
View
7,741 SharedLibs/4.0/Castle.Windsor.xml
7,741 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
BIN SharedLibs/4.0/Rhino.PersistentHashTable.dll
Binary file not shown.
View
BIN SharedLibs/4.0/Rhino.PersistentHashTable.pdb
Binary file not shown.
View
BIN SharedLibs/4.0/Rhino.Queues.dll
Binary file not shown.
View
BIN SharedLibs/4.0/Rhino.Queues.pdb
Binary file not shown.
View
108 build.ps1
@@ -0,0 +1,108 @@
+properties {
+ $base_dir = resolve-path .
+ $lib_dir = "$base_dir\SharedLibs"
+ $lib_for_build_dir = "$lib_dir\build\"
+ $target_framework_version = "3.5"
+ $sln_file = "$base_dir\Rhino.ServiceBus.sln"
+ $version = "1.8.0.0"
+ $tools_dir = "$base_dir\Tools"
+ $config = "Debug"
+ $run_tests = "false"
+}
+
+$framework = '4.0'
+
+include .\psake_ext.ps1
+
+task default -depends Release
+
+task SetDerivedProperties {
+ $script:build_dir = "$base_dir\build\$target_framework_version\"
+ $script:buildartifacts_dir = $build_dir
+ $script:release_dir = "$base_dir\Release\$target_framework_version"
+ $script:build_properties = "OutDir=$buildartifacts_dir;Configuration=$config;TargetFrameworkVersion=V$target_framework_version"
+}
+
+task Clean -depends SetDerivedProperties {
+ remove-item -force -recurse $buildartifacts_dir -ErrorAction SilentlyContinue
+ remove-item -force -recurse $release_dir -ErrorAction SilentlyContinue
+ remove-item -force -recurse $lib_for_build_dir -ErrorAction SilentlyContinue
+}
+
+task Init -depends Clean {
+ Generate-Assembly-Info `
+ -file "$base_dir\Rhino.ServiceBus\Properties\AssemblyInfo.cs" `
+ -title "Rhino Service Bus $version" `
+ -description "Developer friendly service bus for .NET" `
+ -company "Hibernating Rhinos" `
+ -product "Rhino Service Bus $version" `
+ -version $version `
+ -copyright "Hibernating Rhinos & Ayende Rahien 2004 - 2009"
+
+ Generate-Assembly-Info `
+ -file "$base_dir\Rhino.ServiceBus.Tests\Properties\AssemblyInfo.cs" `
+ -title "Rhino Service Bus $version" `
+ -description "Developer friendly service bus for .NET" `
+ -company "Hibernating Rhinos" `
+ -product "Rhino Service Bus $version" `
+ -version $version `
+ -copyright "Hibernating Rhinos & Ayende Rahien 2004 - 2009"
+
+ Generate-Assembly-Info `
+ -file "$base_dir\Rhino.ServiceBus.Host\Properties\AssemblyInfo.cs" `
+ -title "Rhino Service Bus $version" `
+ -description "Developer friendly service bus for .NET" `
+ -company "Hibernating Rhinos" `
+ -product "Rhino Service Bus $version" `
+ -version $version `
+ -copyright "Hibernating Rhinos & Ayende Rahien 2004 - 2009"
+
+ new-item $release_dir -itemType directory
+ new-item $buildartifacts_dir -itemType directory
+ new-item $lib_for_build_dir -itemType directory -force
+ get-childitem "$lib_dir\*.*" -exclude "3.5;4.0" | copy-item -destination {join-path $lib_for_build_dir $_.Name}
+ get-childitem "$lib_dir\$target_framework_version\*.*" | copy-item -destination {join-path $lib_for_build_dir $_.Name}
+}
+
+task Compile -depends Init {
+ msbuild $sln_file /p:$build_properties
+}
+
+task Test -depends Compile {
+ if($run_tests -eq "false")
+ {
+ return
+ }
+ $test_runner = "$tools_dir\xUnit\"
+ $old = pwd
+ cd $build_dir
+ & $tools_dir\xUnit\xunit.console.clr4.exe "$build_dir\Rhino.ServiceBus.Tests.dll"
+ cd $old
+}
+
+task Release -depends Test{
+
+ & $tools_dir\zip.exe -9 -A -j `
+ $release_dir\Rhino.ServiceBus.zip `
+ $build_dir\Castle.Core.dll `
+ $build_dir\Castle.Core.xml `
+ $build_dir\Castle.Windsor.dll `
+ $build_dir\Castle.Windsor.xml `
+ $build_dir\Esent.Interop.dll `
+ $build_dir\Esent.Interop.xml `
+ $build_dir\log4net.dll `
+ $build_dir\log4net.xml `
+ $build_dir\Rhino.PersistentHashTable.dll `
+ $build_dir\Rhino.Queues.dll `
+ $build_dir\Rhino.ServiceBus.dll `
+ $build_dir\Rhino.ServiceBus.xml `
+ $build_dir\Rhino.ServiceBus.Host.exe `
+ $build_dir\Wintellect.Threading.dll `
+ $build_dir\Wintellect.Threading.xml `
+ license.txt `
+ acknowledgements.txt
+ if ($lastExitCode -ne 0) {
+ throw "Error: Failed to execute ZIP command"
+ }
+}
+
View
3 build_release_4.ps1
@@ -1,3 +0,0 @@
-import-module .\psake.psm1
-invoke-psake -framework '4.0' .\default.ps1 -properties @{config='Release';target_framework_version='4.0'}
-remove-module psake
View
113 default.ps1
@@ -1,112 +1,23 @@
-properties {
- $base_dir = resolve-path .
- $lib_dir = "$base_dir\SharedLibs"
- $build_dir = "$base_dir\build"
- $buildartifacts_dir = "$build_dir\"
- $sln_file = "$base_dir\Rhino.ServiceBus.sln"
- $version = "1.8.0.0"
- $tools_dir = "$base_dir\Tools"
- $release_dir = "$base_dir\Release"
+properties {
$config = "Debug"
- $target_framework_version = "3.5"
}
$framework = '4.0'
include .\psake_ext.ps1
-task default -depends Release
+task default -depends ReleaseNET35, ReleaseNET40
-task Clean {
- remove-item -force -recurse $buildartifacts_dir -ErrorAction SilentlyContinue
- remove-item -force -recurse $release_dir -ErrorAction SilentlyContinue
+task ReleaseNET40 {
+ Invoke-Psake .\build.ps1 -properties @{
+ "target_framework_version"="4.0";
+ "config"="$config"
+ }
}
-task Init -depends Clean {
- Generate-Assembly-Info `
- -file "$base_dir\Rhino.ServiceBus\Properties\AssemblyInfo.cs" `
- -title "Rhino Service Bus $version" `
- -description "Developer friendly service bus for .NET" `
- -company "Hibernating Rhinos" `
- -product "Rhino Service Bus $version" `
- -version $version `
- -copyright "Hibernating Rhinos & Ayende Rahien 2004 - 2009"
-
- Generate-Assembly-Info `
- -file "$base_dir\Rhino.ServiceBus.Tests\Properties\AssemblyInfo.cs" `
- -title "Rhino Service Bus $version" `
- -description "Developer friendly service bus for .NET" `
- -company "Hibernating Rhinos" `
- -product "Rhino Service Bus $version" `
- -version $version `
- -copyright "Hibernating Rhinos & Ayende Rahien 2004 - 2009"
-
- Generate-Assembly-Info `
- -file "$base_dir\Rhino.ServiceBus.Host\Properties\AssemblyInfo.cs" `
- -title "Rhino Service Bus $version" `
- -description "Developer friendly service bus for .NET" `
- -company "Hibernating Rhinos" `
- -product "Rhino Service Bus $version" `
- -version $version `
- -copyright "Hibernating Rhinos & Ayende Rahien 2004 - 2009"
-
- new-item $release_dir -itemType directory
- new-item $buildartifacts_dir -itemType directory
-}
-
-task Compile -depends Init {
- $build_properties = "OutDir=$buildartifacts_dir;Configuration=$config"
- if($target_framework_version -eq '4.0')
- {
- $build_properties = "$build_properties;TargetFrameworkVersion=$target_framework_version"
- }
- msbuild $sln_file /p:$build_properties
-}
-
-task Test -depends Compile {
- $test_runner = "$tools_dir\xUnit\"
- $old = pwd
- cd $build_dir
- if($target_framework_version -eq '4.0')
- {
- & $tools_dir\xUnit\xunit.console.clr4.exe "$build_dir\Rhino.ServiceBus.Tests.dll"
- }
- else
- {
- & $tools_dir\xUnit\xunit.console.exe "$build_dir\Rhino.ServiceBus.Tests.dll"
- }
- cd $old
-}
-
-
-task Release -depends Test{
-
- & $tools_dir\zip.exe -9 -A -j `
- $release_dir\Rhino.ServiceBus.zip `
- $build_dir\Castle.Core.dll `
- $build_dir\Castle.Core.xml `
- $build_dir\Castle.DynamicProxy2.dll `
- $build_dir\Castle.DynamicProxy2.xml `
- $build_dir\Castle.MicroKernel.dll `
- $build_dir\Castle.MicroKernel.xml `
- $build_dir\Castle.Windsor.dll `
- $build_dir\Castle.Windsor.xml `
- $build_dir\Esent.Interop.dll `
- $build_dir\Esent.Interop.xml `
- $build_dir\log4net.dll `
- $build_dir\log4net.xml `
- $build_dir\Rhino.DistributedHashTable.Client.dll `
- $build_dir\Rhino.DistributedHashTable.dll `
- $build_dir\Rhino.PersistentHashTable.dll `
- $build_dir\Rhino.Queues.dll `
- $build_dir\Rhino.ServiceBus.dll `
- $build_dir\Rhino.ServiceBus.xml `
- $build_dir\Rhino.ServiceBus.Host.exe `
- $build_dir\Wintellect.Threading.dll `
- $build_dir\Wintellect.Threading.xml `
- license.txt `
- acknowledgements.txt
- if ($lastExitCode -ne 0) {
- throw "Error: Failed to execute ZIP command"
- }
+task ReleaseNET35 {
+ Invoke-Psake .\build.ps1 -properties @{
+ "run_tests"="true";
+ "config"="$config"
+ }
}
View
34 psake.ps1
@@ -1,5 +1,29 @@
-# Helper script for those who want to run
-# psake without importing the module.
-import-module .\psake.psm1
-invoke-psake @args
-remove-module psake
+# Helper script for those who want to run psake without importing the module.
+# Example:
+# .\psake.ps1 "default.ps1" "BuildHelloWord" "4.0"
+
+# Must match parameter definitions for psake.psm1/invoke-psake
+# otherwise named parameter binding fails
+param(
+ [Parameter(Position=0,Mandatory=0)]
+ [string]$buildFile = 'default.ps1',
+ [Parameter(Position=1,Mandatory=0)]
+ [string[]]$taskList = @(),
+ [Parameter(Position=2,Mandatory=0)]
+ [string]$framework = '3.5',
+ [Parameter(Position=3,Mandatory=0)]
+ [switch]$docs = $false,
+ [Parameter(Position=4,Mandatory=0)]
+ [System.Collections.Hashtable]$parameters = @{},
+ [Parameter(Position=5, Mandatory=0)]
+ [System.Collections.Hashtable]$properties = @{}
+)
+
+remove-module psake -ea 'SilentlyContinue'
+$scriptPath = Split-Path -parent $MyInvocation.MyCommand.path
+import-module (join-path $scriptPath psake.psm1)
+if (-not(test-path $buildFile))
+{
+ $buildFile = (join-path $scriptPath $buildFile)
+}
+invoke-psake $buildFile $taskList $framework $docs $parameters $properties
View
1,050 psake.psm1
@@ -20,146 +20,106 @@
#Requires -Version 2.0
-#-- Private Module Variables (Listed here for quick reference)
-[system.collections.stack]$script:context
-
-#-- Public Module Variables -- The psake hashtable variable is initialized in the invoke-psake function
-$script:psake = @{}
-$script:psake.use_exit_on_error = $false # determines if psake uses the "exit()" function when an exception occurs
-$script:psake.log_error = $false # determines if the exception details are written to a file
-$script:psake.build_success = $false # indicates that the current build was successful
-$script:psake.version = "4.00" # contains the current version of psake
-$script:psake.build_script_file = $null # contains a System.IO.FileInfo for the current build file
-$script:psake.framework_version = "" # contains the framework version # for the current build
-$script:psake.default_build_file_name = 'default.ps1'
-
-Export-ModuleMember -Variable "psake"
+DATA msgs
+{
+convertfrom-stringdata @'
+ error_invalid_task_name = Error: Task name should not be null or empty string
+ error_task_name_does_not_exist = Error: task [{0}] does not exist
+ error_circular_reference = Error: Circular reference found for task, {0}
+ error_missing_action_parameter = Error: Action parameter must be specified when using PreAction or PostAction parameters
+ error_corrupt_callstack = Error: CallStack was corrupt. Expected {0}, but got {1}.
+ error_invalid_framework = Error: Invalid .NET Framework version, {0}, specified
+ error_unknown_framework = Error: Unknown .NET Framework version, {0}, specified in {1}
+ error_unknown_pointersize = Error: Unknown pointer size ({0}) returned from System.IntPtr.
+ error_unknown_bitnesspart = Error: Unknown .NET Framework bitness, {0}, specified in {1}
+ error_no_framework_install_dir_found = Error: No .NET Framework installation directory found at {0}
+ error_bad_command = Error executing command: {0}
+ error_default_task_cannot_have_action = Error: 'default' task cannot specify an action
+ error_duplicate_task_name = Error: Task {0} has already been defined.
+ error_invalid_include_path = Error: Unable to include {0}. File not found.
+ error_build_file_not_found = Error: Could not find the build file, {0}.
+ error_no_default_task = Error: default task required
+ error_invalid_module_dir = "Unable to load modules from directory: {0}"
+ error_invalid_module_path = "Unable to load module at path: {0}"
+ error_loading_module = "Error loading module: {0}"
+ postcondition_failed = Error: Postcondition failed for {0}
+ precondition_was_false = Precondition was false not executing {0}
+ continue_on_error = Error in Task [{0}] {1}
+ build_success = Build Succeeded!
+'@
+}
+
+import-localizeddata -bindingvariable msgs -erroraction silentlycontinue
#-- Private Module Functions
-function ExecuteTask
+function Load-Configuration
{
- param([string]$taskName)
-
- Assert (![string]::IsNullOrEmpty($taskName)) "Task name should not be null or empty string"
-
- $taskKey = $taskName.ToLower()
-
- Assert ($script:context.Peek().tasks.Contains($taskKey)) "task [$taskName] does not exist"
-
- if ($script:context.Peek().executedTasks.Contains($taskKey))
- {
- return
- }
-
- Assert (!$script:context.Peek().callStack.Contains($taskKey)) "Error: Circular reference found for task, $taskName"
-
- $script:context.Peek().callStack.Push($taskKey)
-
- $task = $script:context.Peek().tasks.$taskKey
-
- $taskName = $task.Name
-
- $precondition_is_valid = if ($task.Precondition -ne $null) {& $task.Precondition} else {$true}
-
- if (!$precondition_is_valid)
- {
- "Precondition was false not executing $name"
- }
- else
- {
- if ($taskKey -ne 'default')
- {
- $stopwatch = [System.Diagnostics.Stopwatch]::StartNew()
+ $psake.config = new-object psobject -property @{
+ defaultbuildfilename="default.ps1";
+ tasknameformat="Executing {0}";
+ exitcode="1";
+ modules=(new-object psobject -property @{ autoload=$false })
+ }
+
+ $psakeConfigFilePath = (join-path $PSScriptRoot psake-config.ps1)
+
+ if (test-path $psakeConfigFilePath)
+ {
+ try
+ {
+ . $psakeConfigFilePath
+ }
+ catch
+ {
+ throw "Error Loading Configuration from psake-config.ps1: " + $_
+ }
+ }
+}
- if ( ($task.PreAction -ne $null) -or ($task.PostAction -ne $null) )
- {
- Assert ($task.Action -ne $null) "Error: Action parameter must be specified when using PreAction or PostAction parameters"
- }
+function IsChildOfService
+{
+ param
+ (
+ [int]$currentProcessID = $PID
+ )
- if ($task.Action -ne $null)
- {
- try
- {
- foreach($childTask in $task.DependsOn)
- {
- ExecuteTask $childTask
- }
-
- $script:context.Peek().currentTaskName = $taskName
-
- if ($script:context.Peek().taskSetupScriptBlock -ne $null)
- {
- & $script:context.Peek().taskSetupScriptBlock
- }
-
- if ($task.PreAction -ne $null)
- {
- & $task.PreAction
- }
-
- $script:context.Peek().formatTaskNameString -f $taskName
- & $task.Action
-
- if ($task.PostAction -ne $null)
- {
- & $task.PostAction
- }
-
- if ($script:context.Peek().taskTearDownScriptBlock -ne $null)
- {
- & $script:context.Peek().taskTearDownScriptBlock
- }
- }
- catch
- {
- if ($task.ContinueOnError)
- {
- "-"*70
- "Error in Task [$taskName] $_"
- "-"*70
- }
- else
- {
- throw $_
- }
- }
- } # if ($task.Action -ne $null)
- else
- {
- #no Action was specified but we still execute all the dependencies
- foreach($childTask in $task.DependsOn)
- {
- ExecuteTask $childTask
- }
- }
- $stopwatch.stop()
- $task.Duration = $stopwatch.Elapsed
- } # if ($name.ToLower() -ne 'default')
- else
- {
- foreach($childTask in $task.DependsOn)
- {
- ExecuteTask $childTask
- }
- }
+ $currentProcess = gwmi -Query "select * from win32_process where processid = '$currentProcessID'"
- if ($task.Postcondition -ne $null)
+ if ($currentProcess.ProcessID -eq 0) #System Idle Process
{
- Assert (& $task.Postcondition) "Error: Postcondition failed for $taskName"
+ return $false
}
- }
-
- $poppedTaskKey = $script:context.Peek().callStack.Pop()
-
- Assert ($poppedTaskKey -eq $taskKey) "Error: CallStack was corrupt. Expected $taskKey, but got $poppedTaskKey."
+
+ $service = Get-WmiObject -Class Win32_Service -Filter "ProcessId = '$currentProcessID'"
+
+ if ($service) # We are invoked by a windows service
+ {
+ return $true
+ }
+ else
+ {
+ $parentProcess = gwmi -Query "select * from win32_process where processid = '$($currentProcess.ParentProcessID)'"
+ return IsChildOfService $parentProcess.ProcessID
+ }
+}
- $script:context.Peek().executedTasks.Push($taskKey)
+function InNestedScope
+{
+ try
+ {
+ $vars = get-variable -scope 1
+ return $true
+ }
+ catch
+ {
+ return $false
+ }
}
function Configure-BuildEnvironment
{
- if ($framework.Length -ne 3 -and $framework.Length -ne 6) {
- throw "Error: Invalid .NET Framework version, $framework, specified"
+ if ($framework.Length -ne 3 -and $framework.Length -ne 6) {
+ throw ($msgs.error_invalid_framework -f $framework)
}
$versionPart = $framework.Substring(0,3)
$bitnessPart = $framework.Substring(3)
@@ -172,7 +132,7 @@ function Configure-BuildEnvironment
'3.0' { $versions = @('v2.0.50727') }
'3.5' { $versions = @('v3.5','v2.0.50727') }
'4.0' { $versions = @('v4.0.30319') }
- default { throw "Error: Unknown .NET Framework version, $versionPart, specified in $framework" }
+ default { throw ($msgs.error_unknown_framework -f $versionPart,$framework) }
}
$bitness = 'Framework'
@@ -187,17 +147,17 @@ function Configure-BuildEnvironment
{
4 { $bitness = 'Framework' }
8 { $bitness = 'Framework64' }
- default { throw "Error: Unknown pointer size ($ptrSize) returned from System.IntPtr." }
+ default { throw ($msgs.error_unknown_pointersize -f $ptrSize) }
}
}
- default { throw "Error: Unknown .NET Framework bitness, $bitnessPart, specified in $framework" }
+ default { throw ($msgs.error_unknown_bitnesspart -f $bitnessPart,$framework) }
}
}
$frameworkDirs = $versions | foreach { "$env:windir\Microsoft.NET\$bitness\$_\" }
- $frameworkDirs | foreach { Assert (test-path $_) "Error: No .NET Framework installation directory found at $_" }
+ $frameworkDirs | foreach { Assert (test-path $_) ($msgs.error_no_framework_install_dir_found -f $_)}
- $env:path = [string]::Join(';', $frameworkDirs) + ";$env:path"
+ $env:path = ($frameworkDirs -join ";") + ";$env:path"
#if any error occurs in a PS function then "stop" processing immediately
# this does not effect any external programs that return a non-zero exit code
$global:ErrorActionPreference = "Stop"
@@ -205,71 +165,219 @@ function Configure-BuildEnvironment
function Cleanup-Environment
{
- $env:path = $script:context.Peek().originalEnvPath
- Set-Location $script:context.Peek().originalDirectory
- $global:ErrorActionPreference = $script:context.Peek().originalErrorActionPreference
+ if ($psake.context.Count -gt 0)
+ {
+ $currentContext = $psake.context.Peek()
+ $env:path = $currentContext.originalEnvPath
+ Set-Location $currentContext.originalDirectory
+ $global:ErrorActionPreference = $currentContext.originalErrorActionPreference
+ [void]$psake.context.Pop()
+ }
}
#borrowed from Jeffrey Snover http://blogs.msdn.com/powershell/archive/2006/12/07/resolve-error.aspx
function Resolve-Error($ErrorRecord=$Error[0])
{
- "ErrorRecord"
- $ErrorRecord | Format-List * -Force | Out-String -Stream | ? {$_}
- ""
- "ErrorRecord.InvocationInfo"
- $ErrorRecord.InvocationInfo | Format-List * | Out-String -Stream | ? {$_}
- ""
- "Exception"
- $Exception = $ErrorRecord.Exception
- for ($i = 0; $Exception; $i++, ($Exception = $Exception.InnerException))
- {
- "$i" * 70
- $Exception | Format-List * -Force | Out-String -Stream | ? {$_}
- ""
- }
+ $error_message = "`nErrorRecord:{0}ErrorRecord.InvocationInfo:{1}Exception:{2}"
+ $formatted_errorRecord = $ErrorRecord | format-list * -force | out-string
+ $formatted_invocationInfo = $ErrorRecord.InvocationInfo | format-list * -force | out-string
+ $formatted_exception = ""
+ $Exception = $ErrorRecord.Exception
+ for ($i = 0; $Exception; $i++, ($Exception = $Exception.InnerException))
+ {
+ $formatted_exception += ("$i" * 70) + "`n"
+ $formatted_exception += $Exception | format-list * -force | out-string
+ $formatted_exception += "`n"
+ }
+
+ return $error_message -f $formatted_errorRecord,$formatted_invocationInfo,$formatted_exception
}
function Write-Documentation
{
- $list = New-Object System.Collections.ArrayList
- foreach($key in $script:context.Peek().tasks.Keys)
- {
- if($key -eq "default")
- {
- continue
- }
- $task = $script:context.Peek().tasks.$key
- $content = "" | Select-Object Name, Description
- $content.Name = $task.Name
- $content.Description = $task.Description
- $index = $list.Add($content)
- }
-
- $list | Sort 'Name' | Format-Table -Auto
+ $currentContext = $psake.context.Peek()
+ $currentContext.tasks.Keys |
+ foreach-object {
+ if($_ -eq "default") { return }
+
+ $task = $currentContext.tasks.$_
+ new-object PsObject -property @{
+ Name = $task.Name
+ Description = $task.Description
+ "Depends On" = $task.DependsOn -join ", "
+ }
+ } |
+ Sort 'Name' |
+ Format-Table -Auto
}
function Write-TaskTimeSummary
{
- "-"*70
- "Build Time Report"
- "-"*70
- $list = @()
- while ($script:context.Peek().executedTasks.Count -gt 0)
- {
- $taskKey = $script:context.Peek().executedTasks.Pop()
- $task = $script:context.Peek().tasks.$taskKey
- if($taskKey -eq "default")
- {
- continue
- }
- $list += "" | Select-Object @{Name="Name";Expression={$task.Name}}, @{Name="Duration";Expression={$task.Duration}}
- }
- [Array]::Reverse($list)
- $list += "" | Select-Object @{Name="Name";Expression={"Total:"}}, @{Name="Duration";Expression={$stopwatch.Elapsed}}
- $list | Format-Table -Auto | Out-String -Stream | ? {$_} # using "Out-String -Stream" to filter out the blank line that Format-Table prepends
+ "-"*70
+ "Build Time Report"
+ "-"*70
+ $list = @()
+ $currentContext = $psake.context.Peek()
+ while ($currentContext.executedTasks.Count -gt 0)
+ {
+ $taskKey = $currentContext.executedTasks.Pop()
+ $task = $currentContext.tasks.$taskKey
+ if($taskKey -eq "default")
+ {
+ continue
+ }
+ $list += New-Object PsObject -property @{Name=$task.Name; Duration = $task.Duration}
+ }
+ [Array]::Reverse($list)
+ $list += New-Object PsObject -property @{Name="Total:"; Duration=$stopwatch.Elapsed}
+ $list | Format-Table -Auto | Out-String -Stream | ? {$_} # using "Out-String -Stream" to filter out the blank line that Format-Table prepends
}
#-- Public Module Functions
+function Invoke-Task
+{
+<#
+.SYNOPSIS
+This function allows you to call a target from another target
+
+.DESCRIPTION
+This is a function that will allow you to invoke a function from within another function
+
+.PARAMETER taskName
+The name of the task to execute
+
+.EXAMPLE
+invoke-task clean
+
+This example calls "clean" task
+
+.LINK
+Assert
+Invoke-psake
+Task
+Properties
+Include
+FormatTaskName
+TaskSetup
+TaskTearDown
+#>
+ [CmdletBinding()]
+ param([Parameter(Position=0,Mandatory=1)][string]$taskName)
+
+ Assert $taskName ($msgs.error_invalid_task_name)
+
+ $taskKey = $taskName.ToLower()
+
+ $currentContext = $psake.context.Peek()
+ $tasks = $currentContext.tasks
+ $executedTasks = $currentContext.executedTasks
+ $callStack = $currentContext.callStack
+
+ Assert ($tasks.Contains($taskKey)) ($msgs.error_task_name_does_not_exist -f $taskName)
+
+ if ($executedTasks.Contains($taskKey)) { return }
+
+ Assert (!$callStack.Contains($taskKey)) ($msgs.error_circular_reference -f $taskName)
+
+ $callStack.Push($taskKey)
+
+ $task = $tasks.$taskKey
+
+ $precondition_is_valid = & $task.Precondition
+
+ if (!$precondition_is_valid)
+ {
+ $msgs.precondition_was_false -f $taskName
+ }
+ else
+ {
+ if ($taskKey -ne 'default')
+ {
+ $stopwatch = [System.Diagnostics.Stopwatch]::StartNew()
+
+ if ($task.PreAction -or $task.PostAction)
+ {
+ Assert ($task.Action -ne $null) $msgs.error_missing_action_parameter
+ }
+
+ if ($task.Action)
+ {
+ try
+ {
+ foreach($childTask in $task.DependsOn)
+ {
+ Invoke-Task $childTask
+ }
+
+ $currentContext.currentTaskName = $taskName
+
+ & $currentContext.taskSetupScriptBlock
+
+ if ($task.PreAction)
+ {
+ & $task.PreAction
+ }
+
+ if ($currentContext.formatTaskName -is [ScriptBlock])
+ {
+ & $currentContext.formatTaskName $taskName
+ }
+ else
+ {
+ $currentContext.formatTaskName -f $taskName
+ }
+
+ & $task.Action
+
+ if ($task.PostAction)
+ {
+ & $task.PostAction
+ }
+
+ & $currentContext.taskTearDownScriptBlock
+ }
+ catch
+ {
+ if ($task.ContinueOnError)
+ {
+ "-"*70
+ $msgs.continue_on_error -f $taskName,$_
+ "-"*70
+ }
+ else
+ {
+ throw $_
+ }
+ }
+ } # if ($task.Action)
+ else
+ {
+ #no Action was specified but we still execute all the dependencies
+ foreach($childTask in $task.DependsOn)
+ {
+ Invoke-Task $childTask
+ }
+ }
+ $stopwatch.stop()
+ $task.Duration = $stopwatch.Elapsed
+ } # if ($taskKey -ne 'default')
+ else
+ {
+ foreach($childTask in $task.DependsOn)
+ {
+ Invoke-Task $childTask
+ }
+ }
+
+ Assert (& $task.Postcondition) ($msgs.postcondition_failed -f $taskName)
+ }
+
+ $poppedTaskKey = $callStack.Pop()
+ Assert ($poppedTaskKey -eq $taskKey) ($msgs.error_corrupt_callstack -f $taskKey,$poppedTaskKey)
+
+ $executedTasks.Push($taskKey)
+}
+
function Exec
{
<#
@@ -304,21 +412,17 @@ FormatTaskName
TaskSetup
TaskTearDown
#>
-[CmdletBinding(
- SupportsShouldProcess=$False,
- SupportsTransactions=$False,
- ConfirmImpact="None",
- DefaultParameterSetName="")]
-
- param(
- [Parameter(Position=0,Mandatory=1)][scriptblock]$cmd,
- [Parameter(Position=1,Mandatory=0)][string]$errorMessage = "Error executing command: " + $cmd
- )
- & $cmd
- if ($lastexitcode -ne 0)
- {
- throw $errorMessage
- }
+ [CmdletBinding()]
+
+ param(
+ [Parameter(Position=0,Mandatory=1)][scriptblock]$cmd,
+ [Parameter(Position=1,Mandatory=0)][string]$errorMessage = ($msgs.error_bad_command -f $cmd)
+ )
+ & $cmd
+ if ($lastexitcode -ne 0)
+ {
+ throw $errorMessage
+ }
}
function Assert
@@ -372,17 +476,16 @@ The solution is to wrap the condition in () so that PS will evaluate it first.
Assert (1 -eq 2) "1 doesn't equal 2"
#>
-[CmdletBinding(
- SupportsShouldProcess=$False,
- SupportsTransactions=$False,
- ConfirmImpact="None",
- DefaultParameterSetName="")]
-
- param(
- [Parameter(Position=0,Mandatory=1)]$conditionToCheck,
- [Parameter(Position=1,Mandatory=1)]$failureMessage
- )
- if (!$conditionToCheck) { throw $failureMessage }
+ [CmdletBinding()]
+
+ param(
+ [Parameter(Position=0,Mandatory=1)]$conditionToCheck,
+ [Parameter(Position=1,Mandatory=1)]$failureMessage
+ )
+ if (!$conditionToCheck)
+ {
+ throw $failureMessage
+ }
}
function Task
@@ -493,55 +596,62 @@ TaskSetup
TaskTearDown
Assert
#>
-[CmdletBinding(
- SupportsShouldProcess=$False,
- SupportsTransactions=$False,
- ConfirmImpact="None",
- DefaultParameterSetName="")]
+ [CmdletBinding()]
+
param(
[Parameter(Position=0,Mandatory=1)]
[string]$name = $null,
+
[Parameter(Position=1,Mandatory=0)]
[scriptblock]$action = $null,
- [Parameter(Position=2,Mandatory=0)]
+
+ [Parameter(Position=2,Mandatory=0)]
[scriptblock]$preaction = $null,
- [Parameter(Position=3,Mandatory=0)]
+
+ [Parameter(Position=3,Mandatory=0)]
[scriptblock]$postaction = $null,
- [Parameter(Position=4,Mandatory=0)]
- [scriptblock]$precondition = $null,
- [Parameter(Position=5,Mandatory=0)]
- [scriptblock]$postcondition = $null,
- [Parameter(Position=6,Mandatory=0)]
+
+ [Parameter(Position=4,Mandatory=0)]
+ [scriptblock]$precondition = {$true},
+
+ [Parameter(Position=5,Mandatory=0)]
+ [scriptblock]$postcondition = {$true},
+
+ [Parameter(Position=6,Mandatory=0)]
[switch]$continueOnError = $false,
- [Parameter(Position=7,Mandatory=0)]
+
+ [Parameter(Position=7,Mandatory=0)]
[string[]]$depends = @(),
- [Parameter(Position=8,Mandatory=0)]
+
+ [Parameter(Position=8,Mandatory=0)]
[string]$description = $null
)
- if ($name.ToLower() -eq 'default')
- {
- Assert ($action -eq $null) "Error: 'default' task cannot specify an action"
- }
-
- $newTask = @{
- Name = $name
- DependsOn = $depends
- PreAction = $preaction
- Action = $action
- PostAction = $postaction
- Precondition = $precondition
- Postcondition = $postcondition
- ContinueOnError = $continueOnError
- Description = $description
- Duration = 0
- }
-
- $taskKey = $name.ToLower()
-
- Assert (!$script:context.Peek().tasks.ContainsKey($taskKey)) "Error: Task, $name, has already been defined."
-
- $script:context.Peek().tasks.$taskKey = $newTask
+ if ($name -eq 'default')
+ {
+ Assert (!$action) ($msgs.error_default_task_cannot_have_action)
+ }
+
+ $newTask = @{
+ Name = $name
+ DependsOn = $depends
+ PreAction = $preaction
+ Action = $action
+ PostAction = $postaction
+ Precondition = $precondition
+ Postcondition = $postcondition
+ ContinueOnError = $continueOnError
+ Description = $description
+ Duration = 0
+ }
+
+ $taskKey = $name.ToLower()
+
+ $currentContext = $psake.context.Peek()
+
+ Assert (!$currentContext.tasks.ContainsKey($taskKey)) ($msgs.error_duplicate_task_name -f $name)
+
+ $currentContext.tasks.$taskKey = $newTask
}
function Properties
@@ -589,16 +699,9 @@ Assert
.NOTES
You can have more than 1 "Properties" function defined in the script
#>
-[CmdletBinding(
- SupportsShouldProcess=$False,
- SupportsTransactions=$False,
- ConfirmImpact="None",
- DefaultParameterSetName="")]
- param(
- [Parameter(Position=0,Mandatory=1)]
- [scriptblock]$properties
- )
- $script:context.Peek().properties += $properties
+ [CmdletBinding()]
+ param([Parameter(Position=0,Mandatory=1)][scriptblock]$properties)
+ $psake.context.Peek().properties += $properties
}
function Include
@@ -645,17 +748,10 @@ Assert
.NOTES
You can have more than 1 "Include" function defined in the script
#>
-[CmdletBinding(
- SupportsShouldProcess=$False,
- SupportsTransactions=$False,
- ConfirmImpact="None",
- DefaultParameterSetName="")]
- param(
- [Parameter(Position=0,Mandatory=1)]
- [string]$fileNamePathToInclude
- )
- Assert (test-path $fileNamePathToInclude) "Error: Unable to include $fileNamePathToInclude. File not found."
- $script:context.Peek().includes.Enqueue((Resolve-Path $fileNamePathToInclude));
+ [CmdletBinding()]
+ param([Parameter(Position=0,Mandatory=1)][string]$fileNamePathToInclude)
+ Assert (test-path $fileNamePathToInclude) ($msgs.error_invalid_include_path -f $fileNamePathToInclude)
+ $psake.context.Peek().includes.Enqueue((Resolve-Path $fileNamePathToInclude));
}
function FormatTaskName
@@ -718,16 +814,9 @@ TaskSetup
TaskTearDown
Assert
#>
-[CmdletBinding(
- SupportsShouldProcess=$False,
- SupportsTransactions=$False,
- ConfirmImpact="None",
- DefaultParameterSetName="")]
- param(
- [Parameter(Position=0,Mandatory=1)]
- [string]$format
- )
- $script:context.Peek().formatTaskNameString = $format
+ [CmdletBinding()]
+ param([Parameter(Position=0,Mandatory=1)]$format)
+ $psake.context.Peek().formatTaskName = $format
}
function TaskSetup
@@ -759,7 +848,7 @@ Task Clean {
}
TaskSetup {
- "Running 'TaskSetup' for task $script:context.Peek().currentTaskName"
+ "Running 'TaskSetup' for task $context.Peek().currentTaskName"
}
You should get the following output:
@@ -793,16 +882,9 @@ FormatTaskName
TaskTearDown
Assert
#>
-[CmdletBinding(
- SupportsShouldProcess=$False,
- SupportsTransactions=$False,
- ConfirmImpact="None",
- DefaultParameterSetName="")]
- param(
- [Parameter(Position=0,Mandatory=1)]
- [scriptblock]$setup
- )
- $script:context.Peek().taskSetupScriptBlock = $setup
+ [CmdletBinding()]
+ param([Parameter(Position=0,Mandatory=1)][scriptblock]$setup)
+ $psake.context.Peek().taskSetupScriptBlock = $setup
}
function TaskTearDown
@@ -834,7 +916,7 @@ Task Clean {
}
TaskTearDown {
- "Running 'TaskTearDown' for task $script:context.Peek().currentTaskName"
+ "Running 'TaskTearDown' for task $context.Peek().currentTaskName"
}
You should get the following output:
@@ -868,15 +950,9 @@ FormatTaskName
TaskSetup
Assert
#>
-[CmdletBinding(
- SupportsShouldProcess=$False,
- SupportsTransactions=$False,
- ConfirmImpact="None",
- DefaultParameterSetName="")]
- param(
- [Parameter(Position=0,Mandatory=1)]
- [scriptblock]$teardown)
- $script:context.Peek().taskTearDownScriptBlock = $teardown
+ [CmdletBinding()]
+ param([Parameter(Position=0,Mandatory=1)][scriptblock]$teardown)
+ $psake.context.Peek().taskTearDownScriptBlock = $teardown
}
function Invoke-psake
@@ -950,7 +1026,7 @@ Invoke-psake .\properties.ps1 -properties @{"x"="1";"y"="2"}
Runs the build script called 'properties.ps1' and passes in parameters 'x' and 'y' with values '1' and '2'
.OUTPUTS
- If there is an exception and '$psake.use_exit_on_error' -eq $true
+ If there is an exception and the build script was invoked by a windows service (directly/indirectly)
then runs exit(1) to set the DOS lastexitcode variable
otherwise set the '$psake.build_success variable' to $true or $false depending
on whether an exception was thrown
@@ -959,15 +1035,12 @@ Runs the build script called 'properties.ps1' and passes in parameters 'x' and '
When the psake module is loaded a variabled called $psake is created it is a hashtable
containing some variables that can be used to configure psake:
-$psake.use_exit_on_error = $false # determines if psake uses the "exit()" function when an exception occurs
-$psake.log_error = $false # determines if the exception details are written to a file
$psake.build_success = $false # indicates that the current build was successful
$psake.version = "4.00" # contains the current version of psake
$psake.build_script_file = $null # contains a System.IO.FileInfo for the current build file
+$psake.build_script_dir # contains the fully qualified path to the current build file
$psake.framework_version = "" # contains the framework version # for the current build
-$psake.use_exit_on_error and $psake.log_error are boolean variables that can be set before you call Invoke-Psake.
-
You should see the following when you display the contents of the $psake variable right after importing psake
PS projects:\psake> Import-Module .\psake.psm1
@@ -977,12 +1050,11 @@ Name Value
---- -----
version 4.00
build_script_file
-use_exit_on_error False
+build_script_dir
build_success False
-log_error False
framework_version
-After a build is executed the following $psake values are updated (build_script_file, build_success, and framework_version)
+After a build is executed the following $psake values are updated (build_script_file, build_script_dir, build_success, and framework_version)
PS projects:\psake> Invoke-psake .\examples\default.ps1
Executing task: Clean
@@ -1010,9 +1082,8 @@ Name Value
---- -----
version 4.00
build_script_file C:\Users\Jorge\Documents\Projects\psake\examples\default.ps1
-use_exit_on_error False
+build_script_dir C:\Users\Jorge\Documents\Projects\psake\examples
build_success True
-log_error False
framework_version 3.5
.LINK
@@ -1024,185 +1095,202 @@ TaskSetup
TaskTearDown
Assert
#>
-[CmdletBinding(
- SupportsShouldProcess=$False,
- SupportsTransactions=$False,
- ConfirmImpact="None",
- DefaultParameterSetName="")]
-
- param(
- [Parameter(Position=0,Mandatory=0)]
- [string]$buildFile = $script:psake.default_build_file_name,
- [Parameter(Position=1,Mandatory=0)]
- [string[]]$taskList = @(),
- [Parameter(Position=2,Mandatory=0)]
- [string]$framework = '3.5',
- [Parameter(Position=3,Mandatory=0)]
- [switch]$docs = $false,
- [Parameter(Position=4,Mandatory=0)]
- [System.Collections.Hashtable]$parameters = @{},
- [Parameter(Position=5, Mandatory=0)]
- [System.Collections.Hashtable]$properties = @{}
- )
-
- Begin
- {
- $script:psake.build_success = $false
- $script:psake.framework_version = $framework
-
- if ($script:context -eq $null)
- {
- $script:context = New-Object System.Collections.Stack
- }
-
- $script:context.push(@{
- "formatTaskNameString" = "Executing task: {0}";
- "taskSetupScriptBlock" = $null;
- "taskTearDownScriptBlock" = $null;
- "executedTasks" = New-Object System.Collections.Stack;
- "callStack" = New-Object System.Collections.Stack;
- "originalEnvPath" = $env:path;
- "originalDirectory" = Get-Location;
- "originalErrorActionPreference" = $global:ErrorActionPreference;
- "tasks" = @{};
- "properties" = @();
- "includes" = New-Object System.Collections.Queue;
- })
- }
-
- Process
- {
- try
- {
- $stopwatch = [System.Diagnostics.Stopwatch]::StartNew()
-
- <#
- If the default.ps1 file exists and the given "buildfile" isn't found assume that the given
- $buildFile is actually the target Tasks to execute in the default.ps1 script.
- #>
- if((Test-Path $script:psake.default_build_file_name ) -and !(test-path $buildFile)) {
- $list = New-Object System.Collections.ArrayList
- foreach($t in $buildFile.Split(',')) {
- $t1 = $t.Trim()
- if($t1 -ne $null -or $t1 -ne "") {
- $list.Add($t1)
- }
- }
- $taskList = $list.ToArray()
- $buildFile = $script:psake.default_build_file_name
- }
-
- # Execute the build file to set up the tasks and defaults
- Assert (test-path $buildFile) "Error: Could not find the build file, $buildFile."
-
- $script:psake.build_script_file = dir $buildFile
- set-location $script:psake.build_script_file.Directory
- . $script:psake.build_script_file.FullName
-
- if ($docs)
- {
- Write-Documentation
- Cleanup-Environment
- return
- }
-
- Configure-BuildEnvironment
-
- # N.B. The initial dot (.) indicates that variables initialized/modified
- # in the propertyBlock are available in the parent scope.
- while ($script:context.Peek().includes.Count -gt 0)
- {
- $includeBlock = $script:context.Peek().includes.Dequeue()
- . $includeBlock
- }
-
- foreach($key in $parameters.keys)
- {
- if (test-path "variable:\$key")
- {
- set-item -path "variable:\$key" -value $parameters.$key | out-null
- }
- else
- {
- new-item -path "variable:\$key" -value $parameters.$key | out-null
- }
- }
-
- foreach($propertyBlock in $script:context.Peek().properties)
- {
- . $propertyBlock
- }
-
- foreach($key in $properties.keys)
- {
- if (test-path "variable:\$key")
- {
- set-item -path "variable:\$key" -value $properties.$key | out-null
- }
- }
-
- # Execute the list of tasks or the default task
- if($taskList.Length -ne 0)
- {
- foreach($task in $taskList)
- {
- ExecuteTask $task
- }
- }
- elseif ($script:context.Peek().tasks.default -ne $null)
- {
- ExecuteTask default
- }
- else
- {
- throw 'Error: default task required'
- }
-
- $stopwatch.Stop()
-
- "`nBuild Succeeded!`n"
-
- Write-TaskTimeSummary
-
- $script:psake.build_success = $true
+ [CmdletBinding()]
+ param(
+ [Parameter(Position=0,Mandatory=0)]
+ [string]$buildFile = $psake.config.defaultbuildfilename,
+ [Parameter(Position=1,Mandatory=0)]
+ [string[]]$taskList = @(),
+ [Parameter(Position=2,Mandatory=0)]
+ [string]$framework = '3.5',
+ [Parameter(Position=3,Mandatory=0)]
+ [switch]$docs = $false,
+ [Parameter(Position=4,Mandatory=0)]
+ [hashtable]$parameters = @{},
+ [Parameter(Position=5, Mandatory=0)]
+ [hashtable]$properties = @{}
+ )
+
+ try
+ {
+ $psake.build_success = $false
+ $psake.framework_version = $framework
+
+ $psake.context.push(@{
+ "formatTaskName" = $psake.config.tasknameformat;
+ "taskSetupScriptBlock" = {};
+ "taskTearDownScriptBlock" = {};
+ "executedTasks" = New-Object System.Collections.Stack;
+ "callStack" = New-Object System.Collections.Stack;
+ "originalEnvPath" = $env:path;
+ "originalDirectory" = Get-Location;
+ "originalErrorActionPreference" = $global:ErrorActionPreference;
+ "tasks" = @{};
+ "properties" = @();
+ "includes" = New-Object System.Collections.Queue;
+ })
+
+ $currentContext = $psake.context.Peek()
+
+ $modules = $null
+
+ if ($psake.config.modules.autoload -eq $true)
+ {
+ if ($psake.config.modules.directory)
+ {
+ Assert (test-path $psake.config.modules.directory) ($msgs.error_invalid_module_dir -f $psake.config.modules.directory)
+ $modules = get-item (join-path $psake.config.modules.directory *.psm1)
+ }
+ elseif (test-path (join-path $PSScriptRoot "modules"))
+ {
+ $modules = get-item (join-path (join-path $PSScriptRoot "modules") "*.psm1")
+ }
+ }
+ else
+ {
+ if ($psake.config.modules.module)
+ {
+ $modules = $psake.config.modules.module | % { Assert (test-path $_.path) ($msgs.error_invalid_module_path -f $_.path); get-item $_.path }
+ }
+ }
+
+ if ($modules)
+ {
+ $modules | % { "loading module: $_"; $module = import-module $_ -passthru; if (!$module) { throw ($msgs.error_loading_module -f $_.Name)} }
+ ""
+ }
+
+ $stopwatch = [System.Diagnostics.Stopwatch]::StartNew()
+
+ <#
+ If the default.ps1 file exists and the given "buildfile" isn't found assume that the given
+ $buildFile is actually the target Tasks to execute in the default.ps1 script.
+ #>
+ if ((Test-Path $psake.config.defaultbuildfilename ) -and !(test-path $buildFile))
+ {
+ $taskList = $buildFile.Split(',')
+ $buildFile = $psake.config.defaultbuildfilename
+ }
+
+ # Execute the build file to set up the tasks and defaults
+ Assert (test-path $buildFile) ($msgs.error_build_file_not_found -f $buildFile)
+
+ $psake.build_script_file = Get-Item $buildFile
+ $psake.build_script_dir = $psake.build_script_file.DirectoryName
+ set-location $psake.build_script_dir
+ . $psake.build_script_file.FullName
+
+ if ($docs)
+ {
+ Write-Documentation
+ Cleanup-Environment
+ return
+ }
+
+ Configure-BuildEnvironment
+
+ # N.B. The initial dot (.) indicates that variables initialized/modified
+ # in the propertyBlock are available in the parent scope.
+ while ($currentContext.includes.Count -gt 0)
+ {
+ $includeBlock = $currentContext.includes.Dequeue()
+ . $includeBlock
+ }
+
+ foreach($key in $parameters.keys)
+ {
+ if (test-path "variable:\$key")
+ {
+ set-item -path "variable:\$key" -value $parameters.$key | out-null
+ }
+ else
+ {
+ new-item -path "variable:\$key" -value $parameters.$key | out-null
+ }
+ }
+
+ foreach($propertyBlock in $currentContext.properties)
+ {
+ . $propertyBlock
+ }
+
+ foreach($key in $properties.keys)
+ {
+ if (test-path "variable:\$key")
+ {
+ set-item -path "variable:\$key" -value $properties.$key | out-null
+ }
+ }
+
+ # Execute the list of tasks or the default task
+ if($taskList)
+ {
+ foreach($task in $taskList)
+ {
+ invoke-task $task
+ }
+ }
+ elseif ($currentContext.tasks.default)
+ {
+ invoke-task default
+ }
+ else
+ {
+ throw $msgs.error_no_default_task
+ }
+
+ $stopwatch.Stop()
+
+ "`n" + $msgs.build_success + "`n"
+
+ Write-TaskTimeSummary
+
+ $psake.build_success = $true
}
catch
{
- #Append detailed exception and script variables to error log file
- if ($script:psake.log_error)
- {
- $errorLogFile = "psake-error-log-{0}.log" -f ([DateTime]::Now.ToString("yyyyMMdd"))
- "-" * 70 >> $errorLogFile
- "{0}: An Error Occurred. See Error Details Below: " -f [DateTime]::Now >>$errorLogFile
- "-" * 70 >> $errorLogFile
- Resolve-Error $_ >> $errorLogFile
- "-" * 70 >> $errorLogFile
- "Script Variables" >> $errorLogFile
- "-" * 70 >> $errorLogFile
- Get-Variable -scope script >> $errorLogFile
+ $error_message = "{0}: An Error Occurred. See Error Details Below: `n" -f (Get-Date)
+ $error_message += ("-" * 70) + "`n"
+ $error_message += Resolve-Error $_
+ $error_message += ("-" * 70) + "`n"
+ $error_message += "Script Variables" + "`n"
+ $error_message += ("-" * 70) + "`n"
+ $error_message += get-variable -scope script | format-table | out-string
+
+ $psake.build_success = $false
+
+ if (!$psake.run_by_psake_build_tester)
+ {
+ write-host $error_message -foregroundcolor red
+
+ # Need to return a non-zero DOS exit code so that CI server's (Hudson, TeamCity, etc...) can detect a failed job
+ if ( (IsChildOfService) )
+ {
+ exit($psake.config.exitcode)
+ }
+
+ #if we are running in a nested scope then we need to re-throw the exception
+ if ( (InNestedScope) )
+ {
+ throw $_
+ }
+ }
}
+ finally
+ {
+ Cleanup-Environment
+ }
+}
- $buildFileName = Split-Path $buildFile -leaf
- if (test-path $buildFile) { $buildFileName = $script:psake.build_script_file.Name }
- Write-Host -foregroundcolor Red ($buildFileName + ":" + $_)
-
- if ($script:psake.use_exit_on_error)
- {
- exit(1)
- }
- else
- {
- $script:psake.build_success = $false
- }
- }
- } #Process
+$script:psake = @{}
+$psake.build_success = $false # indicates that the current build was successful
+$psake.version = "4.00" # contains the current version of psake
+$psake.build_script_file = $null # contains a System.IO.FileInfo for the current build file
+$psake.build_script_dir = "" # contains a string with fully-qualified path to current build script
+$psake.framework_version = "" # contains the framework version # for the current build
+$psake.run_by_psake_build_tester = $false # indicates that build is being run by psake-BuildTester
+$psake.context = new-object system.collections.stack # holds onto the current state of all variables
- End
- {
- # Clear out any global variables
- Cleanup-Environment
- [void]$script:context.Pop()
- }
-}
+Load-Configuration
-Export-ModuleMember -Function "Invoke-psake","Task","Properties","Include","FormatTaskName","TaskSetup","TaskTearDown","Assert","Exec"
+export-modulemember -function invoke-psake, invoke-task, task, properties, include, formattaskname, tasksetup, taskteardown, assert, exec -variable psake
View
3 readme.md
@@ -10,8 +10,7 @@ Rhino Service Bus currently supports two transports [MSMQ](http://msdn.microsoft
## HOW TO BUILD
From a powershell window
-* .NET 3.5 -- `.\psake.ps1`
-* .NET 4 -- `.\build_release_4.ps1`
+-- `.\psake.ps1`
## MORE INFORMATION

0 comments on commit b8ba818

Please sign in to comment.
Something went wrong with that request. Please try again.