petemounce / rake-dotnet Goto Github PK
View Code? Open in Web Editor NEWA set of custom rake tasks to help eradicate XML from the build scripts of the world.
Home Page: http://blog.neverrunwithscissors.com/tag/rake-dotnet
A set of custom rake tasks to help eradicate XML from the build scripts of the world.
Home Page: http://blog.neverrunwithscissors.com/tag/rake-dotnet
Or figure out how else to fetch them all…?
.
Wrap bcp for bulk insert/dump operations
Can do this by using FileLists to replace the constants as now, so for example
`src_dir_list = [‘src/*’, ‘tests/*’]`
…? Perhaps I’ll wait for someone to vote… Personally, I’m happy with my own conventions! :-)
xunit 1.5 introduces possibility of wanting to run the x86 runner vs the x64 runner. Should be possible to push in a preference when (for example) on an x64 box running a set of tests using the x86 runner (because the test DLL depends on something that is x86-only, like WatiN).
Enough said…
xunit['out/reports/Foo.Unit.Tests/'] is not as friendly as xunit['Foo.Unit.Tests']
Support NDepend
msbuild will blanket-build the contents of src where there is a project file in a sub-directory. Make it possible to ignore some of that file-match glob.
Support NUnit test fixtures via the console runner
It's convenient to follow dependencies in the local environment, but have things be more explicit in CI (because not all agents may be running all tasks, for example). So, make it possible to have some dependencies for local, and others for CI (or, none, to start with).
.
NCover.reporting can produce many, many reports…
The AssemblyInfo task might write the actual time and therefore depends on the current time and should recreate the assembly info files on each run.
From 1ba62249dadc985850c99ff55c227f1c79d9906e Mon Sep 17 00:00:00 2001
From: e-tobi <github AT e-tobi.net>
Date: Thu, 18 Feb 2010 14:15:29 +0100
Subject: [PATCH] Make assembly_info task run always
---
lib/rake_dotnet/tasks/assemblyinfo.rb | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/lib/rake_dotnet/tasks/assemblyinfo.rb b/lib/rake_dotnet/tasks/assemblyinfo.rb
index d7c84d0..d0107c9 100644
--- a/lib/rake_dotnet/tasks/assemblyinfo.rb
+++ b/lib/rake_dotnet/tasks/assemblyinfo.rb
@@ -8,6 +8,9 @@ class AssemblyInfoTask < Rake::TaskLib
end
def define
+ stamp = '.assembly_info_task_stamp'
+ CLEAN.include(stamp)
+
src_dir_regex = regexify(@src_dir)
rule(/#{src_dir_regex}\/[\w\.\d]+\/Properties\/AssemblyInfo.cs/) do |r|
generate_for(r, 'cs')
@@ -39,9 +42,10 @@ class AssemblyInfoTask < Rake::TaskLib
desc 'Generate the AssemblyInfo.cs file from the template closest'
task :assembly_info do
+ File.open(stamp, 'w') {}
Pathname.new(@src_dir).entries.each do |e|
asm_info = asm_info_to_generate(e)
- Rake::FileTask[asm_info].invoke unless asm_info.nil?
+ Rake::FileTask[asm_info].enhance([stamp]).invoke unless asm_info.nil?
end
end
--
1.6.3.msysgit.0
The version.txt should depend on the template, so it automatically gets updated with the template.
From 9acadf6d25dfed34bbd6233f83ac7e34ab59b686 Mon Sep 17 00:00:00 2001
From: e-tobi <github AT e-tobi.net>
Date: Thu, 18 Feb 2010 15:03:36 +0100
Subject: [PATCH 2/2] Update version.txt when template changes
---
lib/rake_dotnet/versioner.rb | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/rake_dotnet/versioner.rb b/lib/rake_dotnet/versioner.rb
index 44c2b35..68fb213 100644
--- a/lib/rake_dotnet/versioner.rb
+++ b/lib/rake_dotnet/versioner.rb
@@ -1,6 +1,8 @@
class Versioner
+ VERSION_TEMPLATE_FILE = 'version.template.txt'
+
def initialize(template_file=nil, opts={})
- tf_path = template_file || 'version.template.txt'
+ tf_path = template_file || VERSION_TEMPLATE_FILE
@tf = Pathname.new(tf_path)
@vf = Pathname.new(tf_path.sub('.template', ''))
end
@@ -34,7 +36,8 @@ class Versioner
end
Version_txt = 'version.txt'
-file Version_txt do
+file Version_txt => Versioner::VERSION_TEMPLATE_FILE do
+ rm_f Version_txt
Versioner.new.get
end
task :version => Version_txt
--
1.6.3.msysgit.0
Maybe?
It has a feature to merge coverage files with eg *.xml - but this will fail in the standard version.
Wrap sqlcmd for database create/drop/script execution
Collect metrics (coverage, fxcop w/e, ndepend CQLs, etc) into a file during a build.
Create a comparator so that we can grab this file from the previous successful build and compare this build to that, and fail the build if entropy is encroaching.
This forces people to not commit code that makes the codebase worse...
This would remove the need to merge coverage files together, which is an ncover-complete feature.
Tools should search for themselves first in local TOOLS_DIR as now, and then failing that in their own standard install locations. This will negate the strict need for tools to reside in source control. This seems acceptable since tools are part of the build process, not deployment; libraries will be referenced in project files, so that's entirely at the user's discretion.
It's actually simpler if output ends up in friendly-name directories rather than with version information (or at least, version-info that changes each build/commit) baked into the paths.
Include publishing to rubyforge…?
Per title - want to create and drop websites.
Like it says...
Since we ARE targetting .NET guys, after all…
When running rake in rake-dotnet\presentation\DemoRoot\Demo\build the following error is returned:
rake aborted!
no such file to load -- ../../../../lib/rake_dotnet.rb
This file doesn't appear to exist.
FxCop fails to resolve an assembly that is referenced via a relative path (why!?). When a /directory: switch is used with the hintpath, it succeeds. Sigh.
Presently, have to pass in CONFIGURATION=Debug or CONFIGURATION=Whatever, to get a build specifically for that configuration into out/bin.
Should instead assume CONFIGURATION is an array with ['Debug'] as sensible default, then build etc once per array-element, and output into a path that includes the current element in it.
... so that if it's non-numeric (eg DVCS generated), it's still part of the assembly information.
And, while I'm at it, make the assemblyinfo part use the erb template engine.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.