Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Enabling creating of the nuget package during the build

  • Loading branch information...
commit ca3dc43ccfde80c444bc1c5b33c105deaddd6475 1 parent 21c5565
@codereflection authored
Showing with 57 additions and 3 deletions.
  1. +22 −0 lib/FileSystem/filesystem.rb
  2. +35 −3 rakefile.rb
View
22 lib/FileSystem/filesystem.rb
@@ -0,0 +1,22 @@
+require 'fileutils'
+
+module FileSystem
+
+ def FileSystem.EnsurePath(path)
+ #if !Dir.exists?(path) then
+ FileUtils.mkdir_p(path)
+ #end
+ end
+
+ def FileSystem.DeleteDirectory(path)
+ #if Dir.exists?(path) then
+ FileUtils.rm_rf path
+ #end
+ end
+
+ def FileSystem.CopyFiles(source, target)
+ Dir.glob(source) do |name|
+ FileUtils.cp(name, target)
+ end
+ end
+end
View
38 rakefile.rb
@@ -2,11 +2,13 @@
require 'rake'
require 'albacore'
+require 'lib/FileSystem/filesystem'
task :default => [:full]
+@GilesVersion = "0.1.0.0"
-task :full => [:clean,:assemblyInfo,:build,:specifications]
+task :full => [:clean,:assemblyInfo,:build,:specifications,:createSpec,:createPackage]
task :clean do
FileUtils.rm_rf 'build'
@@ -32,7 +34,37 @@
asm.title = "Giles, Rupert Giles, at your service!"
asm.company_name = "codereflection"
asm.product_name = "Giles - auto test runner"
- asm.version = "0.1.0.0"
- asm.file_version = "0.1.0.0"
+ asm.version = @GilesVersion
+ asm.file_version = @GilesVersion
asm.copyright = "Copyright (c)2011 Jeff Schumacher (@codereflection). Rupert Giles and all other Buffy The Vampire Slayer references are copyrights of their respective owners."
+end
+
+desc "Prep the package folder"
+task :prepPackage do
+ FileSystem.DeleteDirectory("deploy")
+ FileSystem.EnsurePath("deploy/package")
+ FileSystem.CopyFiles("build/*", "deploy/package")
+end
+
+desc "Create the nuspec"
+nuspec :createSpec => :prepPackage do |nuspec|
+ nuspec.id = "Giles"
+ nuspec.version = @GilesVersion
+ nuspec.authors = "Jeff Schumacher (@codereflection)"
+ nuspec.owners = "Jeff Schumacher (@codereflection)"
+ nuspec.description = "Giles - continuous test runner for .NET applications."
+ nuspec.summary = "Currently supports Machine.Specifications (mspec) and NUnit."
+ nuspec.language = "en-US"
+ nuspec.projectUrl = "http://codereflection.github.com/Giles/"
+ nuspec.title = "Giles, Rupert Giles, at your service!"
+ nuspec.tags = "testrunner test unittest giles"
+ nuspec.output_file = "Giles.nuspec"
+ nuspec.working_directory = "deploy/package"
+end
+
+desc "Create the nuspec package"
+nugetpack :createPackage do |nugetpack|
+ nugetpack.nuspec = "deploy/package/Giles.nuspec"
+ nugetpack.base_folder = "deploy/package"
+ nugetpack.output = "deploy"
end
Please sign in to comment.
Something went wrong with that request. Please try again.