Skip to content

Commit

Permalink
Adding new structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Paul S. Boodhoo committed Mar 14, 2009
1 parent 1e445ed commit ace045c
Show file tree
Hide file tree
Showing 48 changed files with 24,240 additions and 36 deletions.
17 changes: 13 additions & 4 deletions build/assembly_build.ps1
Expand Up @@ -5,11 +5,20 @@ properties{#directories


task deploy_assembly -depends prep_for_distribution{
#$result = .$build_tools_dir\ilmerge\ilmerge.exe /out:$deploy_dir\$project_lib $build_artifacts_dir\$project_lib $build_artifacts_dir\MbUnit.Framework.dll


get_file_names(get-childitem -path $build_artifacts_dir -filter $project_name*dll) | foreach-object{copy-item -path $_ $deploy_dir}
#$result = .$build_tools_dir\ilmerge\ilmerge.exe /out:$deploy_dir\$project_name.dll $build_artifacts_dir\$project_lib $build_artifacts_dir\FirstAssemblyToMerge
get_file_names(get-childitem -path $build_artifacts_dir -recurse -include ("*.dll","*.exe")) | foreach-object{copy-item -path $_ $deploy_dir}

$result
}


properties{#directories
$deploy_dir_bin = "$deploy_dir\bin"
$deploy_dir_images = "$deploy_dir\images"
}






53 changes: 35 additions & 18 deletions build/build.ps1
Expand Up @@ -18,12 +18,12 @@ properties{#directories

$product_dir = "$base_dir\product"


$sql_dir = "$build_dir\sql"
$sql_ddl_dir = "$sql_dir\ddl"
$sql_data_dir = "$sql_dir\data"

$third_party_dir = "$base_dir\thirdparty"
$third_party_tools_dir = "$third_party_dir\tools"
$third_party_lib_dir = "$third_party_dir\lib"
}

properties {#load in the build utilities file
Expand All @@ -36,11 +36,9 @@ properties {#load in the file that contains the name for the project

properties{#filesets
$all_template_files = get_file_names(get-childitem -path $build_dir -recurse -filter "*.template")
$third_party_libraries = get_file_names(get-childitem -path $third_party_lib_dir -recurse -filter *.dll)
$third_party_tools = get_file_names(get-childitem -path $third_party_tools_dir -recurse -filter "*.dll")
$third_party_exes = get_file_names(get-childitem -path $third_party_tools_dir -recurse -filter "*.exe")
$bdd_doc_resources = get_file_names(get-childitem -path $third_party_tools_dir\bdddoc -recurse -include @("*.css","*.jpg"))
$all_third_party_dependencies = $third_party_tools + $third_party_libraries + $third_party_exes + $bdd_doc_resources
$third_party_libraries = get_file_names(get-childitem -path $third_party_dir -recurse -include ("*.dll","*.exe"))
$bdd_doc_resources = get_file_names(get-childitem -path $third_party_dir\bdddoc -recurse -include @("*.css","*.jpg"))
$all_third_party_dependencies = $third_party_libraries + $bdd_doc_resources
$all_sql_ddl_template_files = get_file_names(get-childitem -path $sql_ddl_dir -recurse -filter *.sql.template)
$all_sql_data_template_files = get_file_names(get-childitem -path $sql_data_dir -recurse -filter *.sql.template)
$all_sql_template_files = $all_sql_ddl_template_files , $all_sql_data_template_files
Expand All @@ -49,12 +47,15 @@ properties{#filesets
properties{ #files
$studio_app_config = "$product_dir\$project_name\bin\debug\$project_name.dll.config"
$log4net_config = "$config_dir\log4net.config.xml"
$hibernate_config = "$config_dir\hibernate.cfg.xml"

$now = [System.DateTime]::Now
$project_lib = "$project_name.dll"
$project_test_lib = "$project_name.test.dll"
$db_timestamp = "$sql_dir\db.timestamp"
$nant_properties_file = "$build_dir\local_properties.xml"
}


properties{#logging
$log_dir = "$build_dir\logs"
Expand Down Expand Up @@ -82,14 +83,22 @@ properties{#other build files
. .\assembly_build.ps1
}

properties{#utility functions
function sql_files_have_changed(){
return files_have_changed $all_sql_template_files $db_timestamp
}
}

task default -depends init

task build_db -depends init{
$files_changed = files_have_changed $all_sql_template_files $db_timestamp
task _build_db -depends init{
process_sql_files $script:all_sql_ddl_files $local_settings.osql_exe "-E"
}

if ($files_changed -eq $true)
task build_db -depends init{
if (sql_files_have_changed)
{
process_sql_files $script:all_sql_ddl_files $local_settings.osql_exe "-E"
ExecuteTask _build_db
}
else
{
Expand All @@ -99,6 +108,13 @@ task build_db -depends init{
}

task load_data -depends build_db {
if (sql_files_have_changed){
ExecuteTask _load_data
}

}

task _load_data -depends _build_db{
process_sql_files $script:all_sql_data_files $local_settings.osql_exe "-E"
}

Expand All @@ -115,25 +131,25 @@ task clean{
}

task compile -depends init{
$result = MSBuild.exe "$base_dir\solution.sln" /t:Rebuild /p:Configuration=Debug
$script:product_outputs = get_file_names(get-childitem -path $product_dir -recurse -filter *.dll)
$script:product_debug_outputs = get_file_names(get-childitem -path $product_dir -recurse -filter *.pdb)

$result = MSBuild.exe "$base_dir\solution.sln" /t:Clean /t:Compile /p:Configuration=Debug
$script:product_outputs = get_file_names(get-childitem -path $product_dir -recurse -include ("*.dll","*.exe","*.pdb"))
$result
}

task prep_for_distribution -depends compile{
$all_third_party_dependencies | foreach-object {copy-item -path $_ -destination $build_artifacts_dir}
$script:product_outputs | foreach-object {copy-item -path $_ -destination $build_artifacts_dir}

}

task setup_test -depends prep_for_distribution{
$script:product_outputs | foreach-object {copy-item -path $_ -destination $build_artifacts_dir}
$script:product_debug_outputs | foreach-object {copy-item -path $_ -destination $build_artifacts_dir}
copy-item $app_config -destination "$build_artifacts_dir\$project_test_lib.config"
copy-item $hibernate_config -destination $build_artifacts_dir
copy-item $log4net_config -destination $build_artifacts_dir
}

task test -depends setup_test{
$xunit = "$third_party_tools_dir\mbunit\MbUnit.Cons.exe"
$xunit = "$third_party_dir\mbunit\MbUnit.Cons.exe"
$result = .$xunit $build_artifacts_dir\$project_test_lib /rt:"$($local_settings.xunit_report_type)" /rnf:"$($local_settings.xunit_report_file_name)" /rf:"$($local_settings.xunit_report_file_dir)" /sr

$result
Expand All @@ -153,3 +169,4 @@ task run_ncover -depends setup_test{
task run_test_report -depends test{
$result = ."$build_artifacts_dir\bdddoc.console.exe" "$build_artifacts_dir\$project_test_lib" "ObservationAttribute" "$build_artifacts_dir\SpecReport.html" "$($local_settings.xunit_report_file_dir)\$($local_settings.xunit_report_file_name_with_extension)"
}

12 changes: 12 additions & 0 deletions build/config/hibernate.cfg.xml.template
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.connection_string_name">App</property>
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<property name="show_sql">true</property>
<property name="connection.release_mode">auto</property>
<property name="adonet.batch_size">500</property>
</session-factory>
</hibernate-configuration>
14 changes: 14 additions & 0 deletions build/readme.txt
@@ -0,0 +1,14 @@
Before you try to run any of the build tasks (only test and deploy are really applicable for this project) make sure
you have powershell installed and it is in your path.


*****All build activities are to be done with a command prompt that is pointing at this build folder******

To Test: build test

To Deploy: build deploy_assembly (output will go to the build\deploy folder)

To Open The Solutions: open (you don't have to use this, but if you do it will ensure that the TestDriven.Net runner uses the version
of MBUnit that lives in this project).


9 changes: 8 additions & 1 deletion build/update_externals.ps1
Expand Up @@ -2,8 +2,15 @@
svn export svn://bitwisemaster/thirdparty/open_source/binaries/bdddoc ../thirdparty/tools/bdddoc --force
svn export svn://bitwisemaster/thirdparty/open_source/binaries/mbunit ../thirdparty/tools/mbunit --force
svn export svn://bitwisemaster/thirdparty/open_source/binaries/rhino.mocks ../thirdparty/tools/rhino.mocks --force
svn export svn://bitwisemaster/thirdparty/open_source/binaries/developwithpassion.bdd ../thirdparty/tools/developwithpassion.bdd --force
svn export svn://bitwisemaster/thirdparty/open_source/binaries/developwithpassion.commons ../thirdparty/lib/developwithpassion.commons --force

#lib
svn export svn://bitwisemaster/thirdparty/open_source/binaries/log4net ../thirdparty/lib/log4net --force
svn export svn://bitwisemaster/thirdparty/open_source/binaries/castle ../thirdparty/lib/castle --force
svn export svn://bitwisemaster/thirdparty/open_source/binaries/jpboodhoo.commons ../thirdparty/lib/jpboodhoo.commons --force
svn export svn://bitwisemaster/thirdparty/open_source/binaries/nhibernate ../thirdparty/lib/nhibernate --force

#commons source
svn export svn://bitwisemaster/development/projects/developwithpassion.commons/trunk/product ../product --force
svn export svn://bitwisemaster/development/projects/developwithpassion.bdd/trunk/product ../product --force

Expand Up @@ -32,23 +32,23 @@
<ItemGroup>
<Reference Include="bdddoc, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\thirdparty\tools\bdddoc\bdddoc.dll</HintPath>
<HintPath>..\..\thirdparty\bdddoc\bdddoc.dll</HintPath>
</Reference>
<Reference Include="Castle.DynamicProxy2, Version=2.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\thirdparty\lib\castle\Castle.DynamicProxy2.dll</HintPath>
<HintPath>..\..\thirdparty\castle\Castle.DynamicProxy2.dll</HintPath>
</Reference>
<Reference Include="developwithpassion.commons.core.infrastructure, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\thirdparty\lib\developwithpassion.commons\developwithpassion.commons.core.infrastructure.dll</HintPath>
<HintPath>..\..\thirdparty\developwithpassion.commons\developwithpassion.commons.core.infrastructure.dll</HintPath>
</Reference>
<Reference Include="MbUnit.Framework, Version=2.4.2.130, Culture=neutral, PublicKeyToken=5e72ecd30bc408d5">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\thirdparty\tools\mbunit\MbUnit.Framework.dll</HintPath>
<HintPath>..\..\thirdparty\mbunit\MbUnit.Framework.dll</HintPath>
</Reference>
<Reference Include="Rhino.Mocks, Version=3.5.0.1337, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
<Reference Include="rhino.mocks, Version=3.5.0.1337, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\thirdparty\tools\rhino.mocks\Rhino.Mocks.dll</HintPath>
<HintPath>..\..\thirdparty\rhino.mocks\rhino.mocks.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
Expand Down Expand Up @@ -81,4 +81,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
12 changes: 6 additions & 6 deletions product/developwithpassion.bdd/developwithpassion.bdd.csproj
Expand Up @@ -33,19 +33,19 @@
<ItemGroup>
<Reference Include="developwithpassion.commons.core.infrastructure, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\thirdparty\lib\developwithpassion.commons\developwithpassion.commons.core.infrastructure.dll</HintPath>
<HintPath>..\..\thirdparty\developwithpassion.commons\developwithpassion.commons.core.infrastructure.dll</HintPath>
</Reference>
<Reference Include="MbUnit.Framework, Version=2.4.2.130, Culture=neutral, PublicKeyToken=5e72ecd30bc408d5">
<Reference Include="mbunit.framework, Version=2.4.2.130, Culture=neutral, PublicKeyToken=5e72ecd30bc408d5">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\thirdparty\tools\mbunit\MbUnit.Framework.dll</HintPath>
<HintPath>..\..\thirdparty\mbunit\mbunit.framework.dll</HintPath>
</Reference>
<Reference Include="QuickGraph, Version=2.4.2.130, Culture=neutral, PublicKeyToken=975e84d0c8d6464d">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\thirdparty\tools\mbunit\QuickGraph.dll</HintPath>
<HintPath>..\..\thirdparty\mbunit\QuickGraph.dll</HintPath>
</Reference>
<Reference Include="rhino.mocks, Version=3.5.0.1337, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
<Reference Include="Rhino.Mocks, Version=3.5.0.1337, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\thirdparty\tools\rhino.mocks\rhino.mocks.dll</HintPath>
<HintPath>..\..\thirdparty\rhino.mocks\Rhino.Mocks.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
Expand Down
Binary file added thirdparty/bdddoc/bdddoc-logo.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added thirdparty/bdddoc/bdddoc.console.exe
Binary file not shown.
6 changes: 6 additions & 0 deletions thirdparty/bdddoc/bdddoc.css
@@ -0,0 +1,6 @@
ul.concern {list-style-type: none; width:80%;}
ul.concern li {background: #909090; padding-bottom:20px; padding-left:10px}
ul.observation { width:80%;list-style-type: none;}
ul.observation li {background: #CFD4E6; margin-bottom: 0px; padding-bottom:0px;}
ul.observation li.fail {background: red}
ul.observation li.pass {background: lime}
Binary file added thirdparty/bdddoc/bdddoc.dll
Binary file not shown.
Binary file added thirdparty/castle/Castle.Core.dll
Binary file not shown.
Binary file added thirdparty/castle/Castle.Core.pdb
Binary file not shown.

0 comments on commit ace045c

Please sign in to comment.