Coder Social home page Coder Social logo

nservicebus-contrib's Introduction

NServiceBus Contrib

This readme is a Work in Progress

To build the NServiceBus Contrib you need to have Ruby installed. You can get the latest Ruby Installer from http://rubyinstaller.org

You'll also need the Albacore gem to run the rakefiles

	
		gem install albacore
	

Template rakefile for projects

The NServiceBus Contrib uses a single root rakefile wich calls every rakefile it can find in the subdirectories and executes the 'build' task. For the moment, put the _rakefiletemplate in the same folder as your .sln-file and rename it "rakefile".

	
	require 'albacore'
	require 'FileUtils'

	COMPILE_TARGET = "debug" unless defined?(COMPILE_TARGET)

	build_dir = "#{File.dirname(__FILE__)}/build"

	# Change these two to match your solution and project
	solution_file = "SolutionFile.sln"
	project_directory = "ProjectRootDirectory"

	task :default => ['build']
	 
	desc "Prepares the working directory for a new build"
	task :clean do
		unless defined?(GLOBAL_BUILD_DIR) then
			FileUtils.rm_rf build_dir
			Dir.mkdir build_dir
		end
	end 

	desc "Compile the project"
	msbuild :compile do |msb|
		msb.properties :configuration => COMPILE_TARGET
		msb.targets :Clean, :Build
		msb.solution = File.dirname(__FILE__) + "/#{solution_file}" 
		msb.path_to_command = File.join(ENV['windir'], 'Microsoft.NET', 'Framework', 'v4.0.30319', 'MSBuild.exe') 
	end

	task :build => [:clean, :compile] do  
		
		if defined?(GLOBAL_BUILD_DIR) then
			copyOutputFiles File.dirname(__FILE__)+ "/#{project_directory}/bin/#{COMPILE_TARGET}", "*.{dll,exe,config,pdb}", "#{GLOBAL_BUILD_DIR}/#{project_directory}"
		else
			copyOutputFiles File.dirname(__FILE__)+ "/#{project_directory}/bin/#{COMPILE_TARGET}", "*.{dll,exe,config,pdb}", build_dir
		end
	end 

	def copyOutputFiles(fromDir, filePattern, outDir)
	  mkdir outDir unless File.exists? outDir
	  Dir.glob(File.join(fromDir, filePattern)){|file| 		
		copy(file, outDir) if File.file?(file)
	  } 
	end
	

If you have several projects in your solution, just add a copyOutputFiles for those projects too.

nservicebus-contrib's People

Contributors

jenspettersson avatar johannesg avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.