| 1 | = rakedotnet
|
|---|
| 2 |
|
|---|
| 3 | * http://blog.neverrunwithscissors.com/tag/rake
|
|---|
| 4 |
|
|---|
| 5 | == DESCRIPTION:
|
|---|
| 6 |
|
|---|
| 7 | Rake dotnet is a library of custom tasks designed to (try to!) make your life as a build-automation author easier.
|
|---|
| 8 |
|
|---|
| 9 | When have you ever heard of a build-script called anything other than a script? msbuild and nant both try to get you to call them projects. I'll say it up front - the idea of using XML to declaratively define the sequence of hoops one gets the computer to jump through to turn source into packaged software never sat right with me. I looked for something better one day, and found rake. I haven't touched msbuild or nant since, and I've been happier ;-)
|
|---|
| 10 |
|
|---|
| 11 | Rake dotnet is a bunch of things that aim at doing the work of creating a featureful build-script, so you don't have to. RDN likes convention-over-configuration. RDN tries to keep the Rakefile (the part YOU have to get involved with) short, because that means you can get on with the business of making software that YOU care about. RDN is designed to try to waste as little of your time as possible (and I'd like to know whether I succeeded, or failed, please ;-) ).
|
|---|
| 12 |
|
|---|
| 13 | == FEATURES/PROBLEMS:
|
|---|
| 14 |
|
|---|
| 15 | Features:
|
|---|
| 16 | * Generate AssemblyInfo.cs file(s) for watermarking assemblies with:
|
|---|
| 17 | * major.minor.build.svn-revision version number
|
|---|
| 18 | * product-name
|
|---|
| 19 | * company-name
|
|---|
| 20 | * build configuration
|
|---|
| 21 | * Build the project files to produce said DLLs (call msbuild against the project file(s))
|
|---|
| 22 | * Run XUnit.NET unit tests against said DLLs, and output reports (wrap xunit.console.exe)
|
|---|
| 23 | * Run FxCop against said DLLs, and output reports (wrap fxcopcmd.exe)
|
|---|
| 24 | * Run NCover against build output to generate coverage metrics
|
|---|
| 25 | * Run NCover against coverage to generate coverage reports
|
|---|
| 26 | * Harvest build output
|
|---|
| 27 | * Package build output as a zip file, naming it like {product-name}-{configuration}-v{version}.zip
|
|---|
| 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 |
|
|---|
| 64 |
|
|---|
| 65 | == ROADMAP:
|
|---|
| 66 |
|
|---|
| 67 | (In no particular order)
|
|---|
| 68 | * rdoc documentation to supplement blog'd about
|
|---|
| 69 | * unit-tests
|
|---|
| 70 | * Support other test-runners - nunit, mbunit, gallio
|
|---|
| 71 | * unit-tests!
|
|---|
| 72 | * Support code-coverage runner(s) - ncover 1.68, ncover 3, partcover
|
|---|
| 73 | * unit-tests!!
|
|---|
| 74 | * Support clone-detective...?
|
|---|
| 75 | * unit-tests!!!
|
|---|
| 76 | * Support other source-controls to get build version number - git, mercurial, cvs(?), TFS
|
|---|
| 77 | * unit-tests!!!!
|
|---|
| 78 | * Support changing the conventions to allow users to specify their own source structure
|
|---|
| 79 | * unit-tests
|
|---|
| 80 | * Provide an InstallPad for the 3rdparty bits
|
|---|
| 81 |
|
|---|
| 82 | == REQUIREMENTS:
|
|---|
| 83 |
|
|---|
| 84 | * ruby 1.8.6+
|
|---|
| 85 | * rake 0.8.3+
|
|---|
| 86 |
|
|---|
| 87 | == INSTALL:
|
|---|
| 88 |
|
|---|
| 89 | * sudo gem install rake-dotnet
|
|---|
| 90 |
|
|---|
| 91 | == LICENSE:
|
|---|
| 92 |
|
|---|
| 93 | (The MIT License)
|
|---|
| 94 |
|
|---|
| 95 | Copyright (c) 2009 Peter Mounce
|
|---|
| 96 |
|
|---|
| 97 | Permission is hereby granted, free of charge, to any person obtaining
|
|---|
| 98 | a copy of this software and associated documentation files (the
|
|---|
| 99 | 'Software'), to deal in the Software without restriction, including
|
|---|
| 100 | without limitation the rights to use, copy, modify, merge, publish,
|
|---|
| 101 | distribute, sublicense, and/or sell copies of the Software, and to
|
|---|
| 102 | permit persons to whom the Software is furnished to do so, subject to
|
|---|
| 103 | the following conditions:
|
|---|
| 104 |
|
|---|
| 105 | The above copyright notice and this permission notice shall be
|
|---|
| 106 | included in all copies or substantial portions of the Software.
|
|---|
| 107 |
|
|---|
| 108 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|---|
| 109 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|---|
| 110 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|---|
| 111 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|---|
| 112 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|---|
| 113 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|---|
| 114 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|---|