| | 28 | |
| | 29 | Conventions: |
| | 30 | The tasks rely on you following some conventions. These are configurable to some extent, by calling rake to pass in values for the constants. |
| | 31 | * PRODUCT_ROOT defaults to '..' - rake's working directory is build/, where Rakefile.rb is used. All paths are relative to the rake working directory. |
| | 32 | * OUT_DIR defaults to 'out', hence equivalent to '{PRODUCT_ROOT}/build/out' - build-output gets squirted here. |
| | 33 | * SRC_DIR defaults to '{PRODUCT_ROOT}/src' - buildable projects should live here (this includes test projects). One directory per project, directory-name matches project-filename matches generated assembly-name. |
| | 34 | * TOOLS_DIR defaults to '{PRODUCT_ROOT}/../3rdparty' - intentionally, tools are kept outside of the source tree. This allows for efficient xcopy deployment, or a source-control symbolic link arrangement (svn:externals works well). |
| | 35 | * test projects should have "Tests" somewhere in their project-name. |
| | 36 | * web-application projects should have "Site" somewhere in their project-name. |
| | 37 | * msbuild is assumed to follow its defaults and output into {project-being-built}/bin/{configuration} for class libraries and so forth. |
| | 38 | |
| | 39 | So our source structure looks like: |
| | 40 | / |
| | 41 | /3rdparty - contains tools, one directory per tool |
| | 42 | /Foo |
| | 43 | /build |
| | 44 | /Rakefile.rb |
| | 45 | /src |
| | 46 | /Foo.Bar |
| | 47 | /Foo.Bar.csproj |
| | 48 | {files} |
| | 49 | /Foo.sln |
| | 50 | /OtherProduct |
| | 51 | /build |
| | 52 | /Rakefile.rb |
| | 53 | /src |
| | 54 | /OtherProduct.Core |
| | 55 | /OtherProduct.Core.csproj |
| | 56 | {files} |
| | 57 | /OtherProduct.sln |
| | 58 | |
| | 59 | Example: http://my-svn.assembla.com/svn/nrws/trunk/rake_dotnet/lib/DemoRoot |
| | 60 | |
| | 61 | Problems: |
| | 62 | * Need to get a whole bunch of 3rd-party tools. I might provide an install-pad for this. List is in http://my-svn.assembla.com/svn/nrws/trunk/rake_dotnet/lib/DemoRoot/3rdparty/readme.txt |
| | 63 | |