rake-dotnet 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,10 @@
1
+ === 0.0.6 / 2009-04-06
2
+
3
+ * Move source control to github at http://github.com/petemounce/rake-dotnet
4
+ * Change format of readme to markdown for prettiness on the repo homepage
5
+ * FIX: YYYYMMDD is invalid for file/assembly-version attribute; use '0' instead in non-svn source-control case.
6
+ * FIX: Fix harvesting a web-application when it's not under svn source-control
7
+
1
8
  === 0.0.5 / 2009-04-03
2
9
 
3
10
  * Support non-svn version-control. In this case, write today's date as YYYYMMDD into revision number of assembly version.
data/Manifest.txt CHANGED
@@ -1,6 +1,7 @@
1
1
  History.txt
2
2
  Manifest.txt
3
+ README.markdown
3
4
  README.txt
4
5
  Rakefile
5
6
  lib/rake_dotnet.rb
6
- test/test_rake_dotnet.rb
7
+ test/test_rake_dotnet.rb
data/README.markdown ADDED
@@ -0,0 +1,124 @@
1
+ # rake-dotnet
2
+
3
+ [Rake on my blog](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
14
+
15
+ * Generate AssemblyInfo.cs file(s) for watermarking assemblies with:
16
+ * major.minor.build.svn-revision version number
17
+ * product-name
18
+ * company-name
19
+ * build configuration
20
+ * Build the project files to produce said DLLs (call msbuild against the project file(s))
21
+ * Run XUnit.NET unit tests against said DLLs, and output reports (wrap xunit.console.exe)
22
+ * Run FxCop against said DLLs, and output reports (wrap fxcopcmd.exe)
23
+ * Run NCover against build output to generate coverage metrics
24
+ * Run NCover against coverage to generate coverage reports
25
+ * Harvest build output
26
+ * Package build output as a zip file, naming it like {product-name}-{configuration}-v{version}.zip
27
+
28
+ ## Problems:
29
+
30
+ * Relies on a whole bunch of third-party tools and libraries which are too big to distribute within the gem or host myself. So users need to fetch these before they can get up and running. So think of a way to make this more frictionless...
31
+ * InstallPad?
32
+ * Currently, the directories for each tool are created within [{github}/DemoRoot/3rdparty](http://github.com/petemounce/rake-dotnet/tree/master/DemoRoot/3rdparty) and there is a readme.txt next-door with URLs to fetch from.
33
+
34
+ ## Conventions:
35
+
36
+ The tasks rely on you following some conventions. These are configurable to some extent, by calling rake to pass in values for the constants.
37
+
38
+ * `PRODUCT_ROOT` defaults to `..` - rake's working directory is `build/`, where Rakefile.rb is used. All paths are relative to the rake working directory.
39
+ * `OUT_DIR` defaults to `out`, hence equivalent to `#{PRODUCT_ROOT}/build/out` - build-output gets squirted here.
40
+ * `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.
41
+ * `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).
42
+ * test projects should have `Tests` somewhere in their project-name.
43
+ * web-application projects should have `Site` somewhere in their project-name.
44
+ * msbuild is assumed to follow its defaults and output into `#{SRC_DIR}/{project-being-built}/bin/{configuration}` for class libraries and so forth.
45
+
46
+ So our source structure looks like:
47
+
48
+ /
49
+ /3rdparty - contains tools, one directory per tool
50
+ /Foo
51
+ /build
52
+ /Rakefile.rb
53
+ /src
54
+ /Foo.Bar
55
+ /Foo.Bar.csproj
56
+ {files}
57
+ /Foo.sln
58
+ /OtherProduct
59
+ /build
60
+ /Rakefile.rb
61
+ /src
62
+ /OtherProduct.Core
63
+ /OtherProduct.Core.csproj
64
+ {files}
65
+ /OtherProduct.sln
66
+
67
+ Example: [{github}/DemoRoot](http://github.com/petemounce/rake-dotnet/tree/master/DemoRoot)
68
+
69
+ ## Roadmap:
70
+
71
+ (In no particular order)
72
+
73
+ * rdoc documentation to supplement blog'd about
74
+ * unit-tests
75
+ * Support other test-runners - nunit, mbunit, gallio
76
+ * unit-tests!
77
+ * Support code-coverage runner(s) - ncover 1.68 (?), ncover 3, partcover
78
+ * unit-tests!!
79
+ * Support clone-detective...?
80
+ * unit-tests!!!
81
+ * Support other source-controls to get build version number - git, mercurial, cvs(?), TFS. Or just read it from an environment variable that assumes we're within a CI build.
82
+ * unit-tests!!!!
83
+ * Support changing the conventions to allow users to specify their own source structure
84
+ * unit-tests
85
+ * Provide an InstallPad for the 3rdparty bits
86
+
87
+ ## Requirements:
88
+
89
+ * ruby 1.8.6+ [One-click Windows installer](http://rubyinstaller.rubyforge.org/wiki/wiki.pl)
90
+ * rake 0.8.3+ (but this will be installed when you do `gem install rake-dotnet`)
91
+
92
+ ## Install:
93
+
94
+ 1. `gem install rake-dotnet` (prepend `sudo` if you're not on Windows - which doesn't seem likely considering the audience ;-) )
95
+ 2. Create a directory to hold 3rdparty dependencies
96
+ * if you mirror [{github}/DemoRoot/3rdparty/](http://github.com/petemounce/rake-dotnet/tree/master/DemoRoot/3rdparty) you'll get default paths that rake-dotnet expects
97
+ * if you mirror the structure as above, you won't need to pass in a value for TOOLS_DIR when calling rake
98
+ 3. Fetch the 3rdparty dependencies listed in [{github}/DemoRoot/3rdparty/readme.txt](http://github.com/petemounce/rake-dotnet/tree/master/DemoRoot/3rdparty/readme.txt)
99
+ * rake-dotnet uses tools within the paths taken from the default unzip'd location. For example, svn.exe is expected to live within #{TOOLS_DIR}/svn/bin because that's how svn zip files unzip
100
+
101
+ ## License:
102
+
103
+ (The MIT License)
104
+
105
+ Copyright (c) 2009 Peter Mounce
106
+
107
+ Permission is hereby granted, free of charge, to any person obtaining
108
+ a copy of this software and associated documentation files (the
109
+ 'Software'), to deal in the Software without restriction, including
110
+ without limitation the rights to use, copy, modify, merge, publish,
111
+ distribute, sublicense, and/or sell copies of the Software, and to
112
+ permit persons to whom the Software is furnished to do so, subject to
113
+ the following conditions:
114
+
115
+ The above copyright notice and this permission notice shall be
116
+ included in all copies or substantial portions of the Software.
117
+
118
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
119
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
120
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
121
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
122
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
123
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
124
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.txt CHANGED
@@ -1,77 +1 @@
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
- * Generate AssemblyInfo.cs file(s) for watermarking assemblies with:
16
- * major.minor.build.svn-revision version number
17
- * product-name
18
- * company-name
19
- * build configuration
20
- * Build the project files to produce said DLLs (call msbuild against the project file(s))
21
- * Run XUnit.NET unit tests against said DLLs, and output reports (wrap xunit.console.exe)
22
- * Run FxCop against said DLLs, and output reports (wrap fxcopcmd.exe)
23
- * Run NCover against build output to generate coverage metrics
24
- * Run NCover against coverage to generate coverage reports
25
- * Harvest build output
26
- * Package build output as a zip file, naming it like {product-name}-{configuration}-v{version}.zip
27
-
28
- == ROADMAP:
29
-
30
- (In no particular order)
31
- * rdoc documentation to supplement blog'd about
32
- * unit-tests
33
- * Support other test-runners - nunit, mbunit, gallio
34
- * unit-tests!
35
- * Support code-coverage runner(s) - ncover 1.68, ncover 3, partcover
36
- * unit-tests!!
37
- * Support clone-detective...?
38
- * unit-tests!!!
39
- * Support other source-controls to get build version number - git, mercurial, cvs(?), TFS
40
- * unit-tests!!!!
41
- * Support changing the conventions to allow users to specify their own source structure
42
- * unit-tests
43
- * Provide an InstallPad for the 3rdparty bits
44
-
45
- == REQUIREMENTS:
46
-
47
- * ruby 1.8.6+
48
- * rake 0.8.3+
49
-
50
- == INSTALL:
51
-
52
- * sudo gem install rake-dotnet
53
-
54
- == LICENSE:
55
-
56
- (The MIT License)
57
-
58
- Copyright (c) 2009 Peter Mounce
59
-
60
- Permission is hereby granted, free of charge, to any person obtaining
61
- a copy of this software and associated documentation files (the
62
- 'Software'), to deal in the Software without restriction, including
63
- without limitation the rights to use, copy, modify, merge, publish,
64
- distribute, sublicense, and/or sell copies of the Software, and to
65
- permit persons to whom the Software is furnished to do so, subject to
66
- the following conditions:
67
-
68
- The above copyright notice and this permission notice shall be
69
- included in all copies or substantial portions of the Software.
70
-
71
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
72
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
73
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
74
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
75
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
76
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
77
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ See README.markdown
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'hoe'
5
5
  require 'Pathname'
6
6
  require 'rake/clean'
7
7
 
8
- Hoe.new('rake-dotnet', '0.0.5') do |p|
8
+ Hoe.new('rake-dotnet', '0.0.6') do |p|
9
9
  p.author = 'Peter Mounce'
10
10
  p.description = 'Making a .NET build-automation dev\'s life easier, one angle-bracket at a time'
11
11
  p.email = 'pete@neverrunwithscissors.com'
@@ -41,4 +41,4 @@ task :uninstall_gem do
41
41
  sh "gem uninstall rake-dotnet"
42
42
  end
43
43
 
44
- # vim: syntax=Ruby
44
+ # vim: syntax=Ruby
data/lib/rake_dotnet.rb CHANGED
@@ -333,9 +333,13 @@ module Rake
333
333
  rule(/#{out_dir_regex}\/[\w\.-_ ]*Site[\w\.-_ ]*\//) do |r|
334
334
  web_app_name = r.name.match(/#{out_dir_regex}\/([\w\.-_ ]*Site[\w\.-_ ]*)\//)[1]
335
335
  src = File.join(@src_path, web_app_name)
336
- svn = SvnExport.new(src, r.name)
337
- svn.export
338
- cp_r(File.join(src, 'bin'), r.name)
336
+ if (File.exist?("#{src}/.svn"))
337
+ svn = SvnExport.new(src, r.name)
338
+ svn.export
339
+ cp_r(File.join(src, 'bin'), r.name)
340
+ else
341
+ cp_r src, r.name
342
+ end
339
343
  end
340
344
 
341
345
  desc "Harvest specified web-applications (or all matching #{@src_path}/#{@glob}) to #{@target_path}"
@@ -845,8 +849,7 @@ class Versioner
845
849
  if (Pathname.new('.svn').exist?)
846
850
  SvnInfo.new(:path => '.').revision
847
851
  else
848
- now = Date.today
849
- "#{now.to_s.gsub('-','')}"
852
+ '0' # YYYYMMDD is actually invalid for a {revision} number.
850
853
  end
851
854
  end
852
855
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-dotnet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter MouncePeter Mounce
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-03 00:00:00 +01:00
12
+ date: 2009-04-07 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -45,12 +45,13 @@ extra_rdoc_files:
45
45
  files:
46
46
  - History.txt
47
47
  - Manifest.txt
48
+ - README.markdown
48
49
  - README.txt
49
50
  - Rakefile
50
51
  - lib/rake_dotnet.rb
51
52
  - test/test_rake_dotnet.rb
52
53
  has_rdoc: true
53
- homepage: http://blog.neverrunwithscissors.com/tag/rake
54
+ homepage:
54
55
  post_install_message:
55
56
  rdoc_options:
56
57
  - --main