Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added ripple to pull nuget dependencies, edited Rake build script to …

…leverage ripple
  • Loading branch information...
commit b6c5738f251757025f779b9b1411cea7bb3657c2 1 parent b0d5314
@chester89 chester89 authored
View
2  .gitignore
@@ -25,3 +25,5 @@ build
*.swp
TestResult.xml
src/packages/
+TestResult.xml
+build/
View
2  Build.bat
@@ -1 +1 @@
-rake
+rake
View
44 RakeFile
@@ -4,6 +4,28 @@ require './tools/albacore/nuspec_patch'
NH_VERSION = '3.x'
+module Platform
+
+ def self.is_nix
+ !RUBY_PLATFORM.match("linux|darwin").nil?
+ end
+
+ def self.runtime(cmd)
+ command = cmd
+ if self.is_nix
+ runtime = (CLR_TOOLS_VERSION || "v4.0.30319")
+ command = "mono --runtime=#{runtime} #{cmd}"
+ end
+ command
+ end
+
+ def self.switch(arg)
+ sw = self.is_nix ? " -" : " /"
+ sw + arg
+ end
+
+end
+
def get_version
ENV['BUILD_NUMBER'] || '1.3.0.0'
end
@@ -12,12 +34,20 @@ task :default => 'build:all'
namespace :ci do
task :run_ci_build => [
+ 'ripple',
'build:all',
'docs:build',
'package:all',
]
end
+namespace :ripple do
+ desc 'using ripple. yay!'
+ ripple = Platform.runtime("buildsupport/ripple.exe")
+ args = "restore"
+ sh "#{ripple} #{args}"
+ end
+
namespace :source do
desc 'Update assembly info with latest version number'
assemblyinfo :update_version do |asm|
@@ -26,7 +56,7 @@ namespace :source do
asm.version = get_version
asm.company_name = 'http://fluentnhibernate.org'
asm.product_name = 'FluentNHibernate'
- asm.copyright = 'Copyright 2008-2011 James Gregory and contributors (Paul Batum, Hudson Akridge et al). All rights reserved.'
+ asm.copyright = 'Copyright 2008-2013 James Gregory and contributors (Paul Batum, Hudson Akridge et al). All rights reserved.'
asm.namespaces = ['System.Security']
asm.custom_attributes :AllowPartiallyTrustedCallers => nil
@@ -35,16 +65,6 @@ namespace :source do
task :nhibernate_version, :nhibernate_version do |t,args|
args.with_defaults :nhibernate_version => ENV['nhibernate_version'] || NH_VERSION
-
- raise "Unknown NHibernate version #{args.nhibernate_version} (check your tools/NHibernate folder)" unless File.directory? "tools/NHibernate/#{args.nhibernate_version}"
-
- # clear out existing selected nh version
- files_to_delete = Dir["tools/NHibernate/*.*"].reject {|f| File.directory? f }
- files_to_delete.each {|f| File.delete f }
-
- # copy specific nh version files to the main directory
- files_to_copy = Dir["tools/NHibernate/#{args.nhibernate_version}/*.*"]
- files_to_copy.each {|f| FileUtils.copy f, "tools/NHibernate/" }
end
desc 'Compile the source'
@@ -77,7 +97,7 @@ namespace :specs do
desc 'Run NUnit tests'
nunit :nunit do |nunit|
- nunit.command = 'tools/nunit/nunit-console-x86.exe'
+ nunit.command = 'src/packages/NUnit.2.5.7.10213/Tools/nunit-console-x86.exe'
nunit.assemblies 'src/FluentNHibernate.Testing/bin/Release/FluentNHibernate.Testing.dll'
end
end
View
121 buildsupport/BuildUtils.rb
@@ -0,0 +1,121 @@
+require 'erb'
+
+class NUnitRunner
+ include FileTest
+
+ def initialize(paths)
+ @sourceDir = paths.fetch(:source, 'source')
+ @resultsDir = paths.fetch(:results, 'results')
+ @compilePlatform = paths.fetch(:platform, '')
+ @compileTarget = paths.fetch(:compilemode, 'debug')
+
+ @nunitExe = Nuget.tool("NUnit", "nunit-console#{(@compilePlatform.empty? ? '' : "-#{@compilePlatform}")}.exe") + Platform.switch("nothread")
+ end
+
+ def executeTests(assemblies)
+ Dir.mkdir @resultsDir unless exists?(@resultsDir)
+
+ assemblies.each do |assem|
+ file = File.expand_path("#{@sourceDir}/#{assem}/bin/#{@compileTarget}/#{assem}.dll")
+ sh Platform.runtime("#{@nunitExe} -xml=#{@resultsDir}/#{assem}-TestResults.xml \"#{file}\"")
+ end
+ end
+end
+
+class MSBuildRunner
+ def self.compile(attributes)
+ compileTarget = attributes.fetch(:compilemode, 'debug')
+ solutionFile = attributes[:solutionfile]
+
+ attributes[:projFile] = solutionFile
+ attributes[:properties] ||= []
+ attributes[:properties] << "Configuration=#{compileTarget}"
+ attributes[:extraSwitches] = ["v:m", "t:rebuild"]
+ attributes[:extraSwitches] << "maxcpucount:2" unless Platform.is_nix
+
+ self.runProjFile(attributes);
+ end
+
+ def self.runProjFile(attributes)
+ version = attributes.fetch(:clrversion, 'v4.0.30319')
+ compileTarget = attributes.fetch(:compilemode, 'debug')
+ projFile = attributes[:projFile]
+
+ if Platform.is_nix
+ msbuildFile = `which xbuild`.chop
+ attributes[:properties] << "TargetFrameworkProfile="""""
+ else
+ frameworkDir = File.join(ENV['windir'].dup, 'Microsoft.NET', 'Framework', version)
+ msbuildFile = File.join(frameworkDir, 'msbuild.exe')
+ end
+
+ properties = attributes.fetch(:properties, [])
+
+ switchesValue = ""
+
+ properties.each do |prop|
+ switchesValue += " /property:#{prop}"
+ end
+
+ extraSwitches = attributes.fetch(:extraSwitches, [])
+
+ extraSwitches.each do |switch|
+ switchesValue += " /#{switch}"
+ end
+
+ targets = attributes.fetch(:targets, [])
+ targetsValue = ""
+ targets.each do |target|
+ targetsValue += " /t:#{target}"
+ end
+
+ sh "#{msbuildFile} #{projFile} #{targetsValue} #{switchesValue}"
+ end
+end
+
+class AspNetCompilerRunner
+ def self.compile(attributes)
+ if Platform.is_nix
+ puts "Skipping AspNet compilation. Not supported by Mono."
+ return
+ end
+ webPhysDir = attributes.fetch(:webPhysDir, '')
+ webVirDir = attributes.fetch(:webVirDir, 'This_Value_Is_Not_Used')
+
+ frameworkDir = File.join(ENV['windir'].dup, 'Microsoft.NET', 'Framework', 'v4.0.30319')
+ aspNetCompiler = File.join(frameworkDir, 'aspnet_compiler.exe')
+
+ sh "#{aspNetCompiler} -nologo -errorstack -c -p #{webPhysDir} -v #{webVirDir}"
+ end
+end
+
+class AsmInfoBuilder
+ attr_reader :buildnumber
+
+ def initialize(baseVersion, properties)
+ @properties = properties;
+
+ @buildnumber = baseVersion + (ENV["CCNetLabel"].nil? ? '0' : ENV["CCNetLabel"].to_s)
+ @properties['Version'] = @properties['InformationalVersion'] = buildnumber;
+ end
+
+
+
+ def write(file)
+ template = %q{
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+<% @properties.each {|k, v| %>
+[assembly: Assembly<%=k%>Attribute("<%=v%>")]
+<% } %>
+ }.gsub(/^ /, '')
+
+ erb = ERB.new(template, 0, "%<>")
+
+ File.open(file, 'w') do |file|
+ file.puts erb.result(binding)
+ end
+ end
+end
View
BIN  buildsupport/FubuCore.dll
Binary file not shown
View
BIN  buildsupport/FubuCore.pdb
Binary file not shown
View
BIN  buildsupport/ILMerge.exe
Binary file not shown
View
38 buildsupport/ILRepack.rb
@@ -0,0 +1,38 @@
+load "#{File.dirname(__FILE__)}/platform.rb"
+class ILRepack
+
+ def initialize(attributes)
+
+ out = attributes.fetch(:out, '')
+ lib = attributes.fetch(:lib, nil)
+ target = attributes.fetch(:target, 'library')
+ targetplatform = attributes.fetch(:targetplatform, "v4")
+ internalize = attributes.fetch(:internalize, true)
+ debugsymbols = attributes.fetch(:debugsymbols, false)
+ union = attributes.fetch(:union, false)
+
+ params = []
+ params << "/out:#{out}"
+ params << "/lib:#{lib}" unless lib.nil?
+ params << "/target:#{target}" unless target.nil?
+ params << "/targetplatform:#{targetplatform}" unless targetplatform.nil?
+ params << "/internalize" if internalize
+ params << "/ndebug" unless debugsymbols
+ params << "/union" if union
+
+ merge_exe = "#{File.dirname(__FILE__)}/ILMerge.exe"
+ @cmd = "#{merge_exe} #{params.join(' ')}"
+ end
+
+ def merge(params)
+
+ if Platform.is_nix
+ puts "Merging is *currently* not supported on Mono. Skipping merge..."
+ return
+ end
+
+ src = params.fetch(:lib, '')
+ refs = params.fetch(:refs, []).map {|f| File.join(src, f)}
+ sh Platform.runtime("#{@cmd} #{refs.join(' ')}")
+ end
+end
View
BIN  buildsupport/NuGet.exe
Binary file not shown
View
5 buildsupport/RakeFile
@@ -0,0 +1,5 @@
+Dir["#{File.dirname(__FILE__)}/*.rb"].each { |ext| load ext }
+
+task :default do
+ puts "This RakeFile exists solely for testing imported tasks. Run rake -T to see imported tasks."
+end
View
30 buildsupport/Ruby_Not_Installed.txt
@@ -0,0 +1,30 @@
+
+**********************************************
+WE'RE SORRY!
+Ruby not installed?
+**********************************************
+
+It appears you do not have Ruby installed.
+This project uses the "Rake" build system from Ruby.
+
+If you *DO* have Ruby installed, please make sure the
+Ruby\bin folder is in your PATH.
+
+If you *DON'T* have Ruby installed then, in order to
+run "Rake", please perform the following steps:
+
+ 1.) Download and install Ruby 1.8.6 (or later --
+ "1.8.6. One-Click installer recommended for Windows)
+
+ - Main Download URL:
+ http://www.ruby-lang.org/en/downloads/
+
+ - 1.8.6 One-Click installer:
+ http://rubyforge.org/frs/download.php/29263/ruby186-26.exe
+ (md5: 00540689d1039964bc8d844b2b0c7db6)
+
+
+ 2.) Install the Rake "Gem" and related "Gems" by running
+ InstallGems.bat in the same folder as this Build.bat file
+
+**********************************************
View
15 buildsupport/common.rb
@@ -0,0 +1,15 @@
+ desc "Update buildsupport submodule"
+ task :update_buildsupport do
+ #Go update the buildsupport submodule so it's always current.
+ Dir.chdir("buildsupport") do
+ puts "*** Updating buildsupport..."
+ begin
+ sh 'git fetch'
+ sh 'git checkout master'
+ sh 'git rebase origin/master'
+ puts "*** Buildsupport updated."
+ rescue
+ puts "*** Error updating submodule"
+ end
+ end
+ end
View
246 buildsupport/nuget.rb
@@ -0,0 +1,246 @@
+namespace :nuget do
+ buildsupport_path = File.dirname(__FILE__)
+ nuget = "#{buildsupport_path}/nuget.exe"
+ nugroot = File.expand_path(ENV['NUGET_HUB'] || "/nugs")
+
+
+ desc "Build the nuget package"
+ task :build do
+ rm Dir.glob("#{ARTIFACTS}/*.nupkg")
+ FileList["packaging/nuget/*.nuspec"].each do |spec|
+ sh "#{nuget} pack #{spec} -o #{ARTIFACTS} -Version #{BUILD_NUMBER} -Symbols"
+ end
+ end
+
+ desc "update dependencies from local machine"
+ task :pull, [:package] do |task, args|
+ Nuget.each_installed_package do |package|
+ next if args[:package] && Nuget.package_name(package).downcase != args[:package].downcase
+ src_package = File.join nugroot, Nuget.package_name(package)
+ if File.directory? src_package
+ ['lib','tools'].each do |folder|
+ dst = File.join package, folder
+ src = File.join src_package, folder
+ if File.directory? src
+ clean_dir dst
+ cp_r src + "/.", dst, :verbose => false
+ after_nuget_update(Nuget.package_name(package), dst) if respond_to? :after_nuget_update
+ end
+ end
+ puts "pulled from #{src_package}"
+ else
+ puts "could not find #{src_package}"
+ end
+ end
+ end
+
+ desc "Updates dependencies from nuget.org"
+ task :update => [:update_packages, :clean, :update_callback]
+
+ task :update_packages do
+ FileList["**/*.sln"].each do |proj|
+ sh "#{nuget} update #{proj}"
+ end
+ FileList["**/packages.config"].each do |proj|
+ sh "#{nuget} install #{proj} -OutputDirectory #{Nuget.package_root}"
+ end
+ end
+
+ task :update_callback do
+ after_nuget_update(nil, Nuget.package_root) if respond_to? :after_nuget_update
+ end
+
+ desc "pushes dependencies to central location on local machine for nuget:pull from other repos"
+ task :push, [:package] => :build do |task, args|
+ FileList["#{ARTIFACTS}/*.nupkg"].exclude(".symbols.nupkg").each do |file|
+ next if args[:package] && Nuget.package_name(file).downcase != args[:package].downcase
+ destination = File.join nugroot, Nuget.package_name(file)
+ clean_dir destination
+ unzip_file file, destination
+ puts "pushed to #{destination}"
+ end
+ end
+
+ def clean_dir(path)
+ mkdir_p path, :verbose => false
+ rm_r Dir.glob(File.join(path, "*.*")), :verbose => false
+ end
+
+ def unzip_file (file, destination)
+ require 'rubygems'
+ require 'zip/zip'
+ Zip::ZipFile.open(file) { |zip_file|
+ zip_file.each { |f|
+ f_path=File.join(destination, f.name)
+ FileUtils.mkdir_p(File.dirname(f_path))
+ zip_file.extract(f, f_path) unless File.exist?(f_path)
+ }
+ }
+ end
+
+ desc "Pushes nuget packages to the official feed"
+ task :release, [:package] do |t, args|
+ require 'open-uri'
+ release_path = "#{buildsupport_path}/nuget_release"
+ clean_dir release_path
+
+ artifact_url = "http://teamcity.codebetter.com/guestAuth/repository/downloadAll/#{@teamcity_build_id}/.lastSuccessful/artifacts.zip"
+ puts "downloading artifacts from #{artifact_url}"
+ artifact = open(artifact_url)
+ unzip_file artifact.path, release_path
+ FileList["#{release_path}/*.nupkg"].exclude(".symbols.nupkg").each do |nupkg|
+ next if args[:package] && Nuget.package_name(nupkg).downcase != args[:package].downcase
+ sh "#{nuget} push #{nupkg}" do |ok, res|
+ puts "May not have published #{nupkg}" unless ok
+ end
+ end
+ end
+
+ task :clean do
+ require 'rexml/document'
+ repo_paths = Nuget.repositories
+ packages = repo_paths.map{|repo| Nuget.packages(repo)}.reduce(:|)
+
+ Nuget.each_installed_package do |package|
+ name = Nuget.package_name(package)
+ tracked = packages.select{|p| p.include? name}
+ if tracked.any? # only remove folders for older versions of tracked packages
+ should_delete = !tracked.detect{|t| package.end_with? t[name]}
+ rm_rf package if should_delete
+ end
+ end
+
+ end
+end
+
+namespace :ripple do
+ @ripple_root = File.expand_path(File.join(File.dirname(__FILE__), "../../") + "/ripple")
+ @progress_file = "#{@ripple_root}/packages/ripple.txt"
+
+ task :local => ["nuget:pull", :ci, "nuget:push"]
+ task :public => [:gitupdate, "nuget:update", :ci, :commit, :manualsteps]
+
+ task :gitupdate do
+ #raise "Uncommitted changes in #{Dir.pwd}" unless `git status --porcelain`.strip.empty?
+ sh "git checkout master && git pull --ff-only" do |ok, status|
+ raise "Cannot pull latest into #{Dir.pwd}. You need to rebase or merge origin/master" unless ok
+ end
+ end
+
+ task :commit do
+ status = `git status --porcelain`
+ changes = status.split("\n").select{|l| l.start_with? "??"}.map{|l| l.match(/packages\/(.*)\//)[1]}
+ if changes.any?
+ msg = "Updated packages: #{changes.join(", ")}"
+ sh "git add -A"
+ sh "git commit -m \"#{msg}\""
+ else
+ puts "no changes to commit in #{Dir.pwd}"
+ end
+ end
+
+ task :manualsteps do
+ puts """
+*******************************
+1) Push your changes to github.
+2) Optionally kick off the teamcity build manually (if it hasn't started automatically yet)
+3) Wait for teamcity build to finish
+4) Run rake ripple:publish to continue after publishing nuget packages publicly
+ or rake ripple:continue to continue without publishing publicly
+"""
+ sh "start http://teamcity.codebetter.com/viewType.html?buildTypeId=#{@teamcity_build_id}"
+ end
+
+ task :continue do
+ job = get_next_job
+ if job
+ puts "mark #{job} as complete"
+ mark_complete job
+
+ run_in @ripple_root, "rake ripple:nextjob"
+ else
+ puts "no current job to continue"
+ end
+ end
+
+ task :publish => ["nuget:release", :continue]
+
+ def mark_complete(job)
+ jobs = get_ripple_jobs
+ raise "Job does not exist: #{job} -- cannot mark it complete" unless jobs.include? job
+ init_ripple_jobs(jobs - [job])
+ end
+
+ def get_next_job
+ jobs = get_ripple_jobs
+ return nil unless jobs.any?
+ jobs[0]
+ end
+
+ def get_ripple_jobs
+ File.readlines(@progress_file).map{|x| x.chomp}.reject{|x| x.empty?}
+ end
+
+ def init_ripple_jobs(jobs)
+ File.open(@progress_file, "w") do |file|
+ jobs.each{|job| file.puts job}
+ end
+ end
+end
+
+
+module Nuget
+ def self.each_installed_package
+ FileList[File.join(package_root, "*")].exclude{|f| File.file?(f)}.each do |package|
+ yield package
+ end
+ end
+
+ def self.packages(package_config)
+ xml = REXML::Document.new File.read package_config
+ xml.get_elements('packages/package').map do |p|
+ { p.attributes['id'] => p.attributes['version'] }
+ end
+ end
+
+ def self.repositories
+
+ #get packages.config from nuget's repositories.config file in the package root
+ repo_file_path = File.join package_root, "repositories.config"
+ if FileTest.exists? repo_file_path
+ file = REXML::Document.new File.read repo_file_path
+ return file.get_elements("repositories/repository").map{|node| File.expand_path(File.join(package_root, node.attributes["path"]))}
+ end
+
+ #otherwise glob all the packages.config in the source directory
+ Dir.glob("{source,src}/**/packages.config")
+ end
+
+ def self.package_root
+ root = nil
+
+ packroots = Dir.glob("{source,src}/packages")
+
+ return packroots.last if packroots.length > 0
+
+ Dir.glob("{source,src}").each do |d|
+ packroot = File.join d, "packages"
+ FileUtils.mkdir_p(packroot)
+ root = packroot
+ end
+
+ root
+ end
+
+ def self.package_name(filename)
+ File.basename(filename, ".nupkg").gsub(/[\d.]+$/, "")
+ end
+
+ def self.tool(package, tool)
+ File.join(Dir.glob(File.join(package_root,"#{package}.*")).sort.last, "tools", tool)
+ end
+end
+
+def run_in(working_dir, cmd)
+ sh "buildsupport/run_in_path.cmd #{working_dir.gsub('/','\\')} #{cmd}"
+end
View
21 buildsupport/platform.rb
@@ -0,0 +1,21 @@
+module Platform
+
+ def self.is_nix
+ !RUBY_PLATFORM.match("linux|darwin").nil?
+ end
+
+ def self.runtime(cmd)
+ command = cmd
+ if self.is_nix
+ runtime = (CLR_TOOLS_VERSION || "v4.0.30319")
+ command = "mono --runtime=#{runtime} #{cmd}"
+ end
+ command
+ end
+
+ def self.switch(arg)
+ sw = self.is_nix ? " -" : " /"
+ sw + arg
+ end
+
+end
View
1  buildsupport/ripple.cmd
@@ -0,0 +1 @@
+src\ripple\bin\debug\ripple.exe %*
View
BIN  buildsupport/ripple.exe
Binary file not shown
View
18 buildsupport/ripple.exe.config
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <startup>
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
+ </startup>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="StructureMap.AutoMocking" publicKeyToken="e60ad81abae3c223" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-2.6.4.0" newVersion="2.6.4.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="StructureMap" publicKeyToken="e60ad81abae3c223" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-2.6.4.0" newVersion="2.6.4.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration>
View
BIN  buildsupport/ripple.pdb
Binary file not shown
View
70 buildsupport/ripple.rb
@@ -0,0 +1,70 @@
+
+ desc "Restores nuget package files"
+ task :restore do
+ puts 'Restoring all the nuget package files'
+ restore
+ end
+
+ desc "Updates nuget package files to the latest"
+ task :update do
+ puts 'Updating all the nuget package files'
+ update
+ end
+
+ desc "For CI mode, replaces all dependencies with the latest, greatest version of all"
+ task :update_all_dependencies do
+ ripple 'clean'
+ update
+ restore
+ end
+
+ desc "restore packages if the files don't seem to exist"
+ task :restore_if_missing do
+ packageFiles = Dir["#{File.dirname(__FILE__)}/src/packages/*.dll"]
+ restore unless packageFiles.any?
+ end
+
+ desc "creates a history file for nuget dependencies"
+ task :history do
+ ripple 'history'
+ end
+
+ desc "publishes all the nuget's published by this solution"
+ task :publish do
+ nuget_api_key = ENV['apikey']
+ server = ENV['server']
+ cmd = "publish #{BUILD_NUMBER} #{nuget_api_key}"
+ cmd = cmd + " --server #{server}" unless server.nil?
+ ripple cmd
+ end
+
+ desc "packages the nuget files from the nuspec files in packaging/nuget and publishes to /artifacts"
+ task :package => [:history] do
+ cmd = "local-nuget --version #{BUILD_NUMBER} --destination artifacts"
+ ripple cmd
+ end
+
+ def self.update()
+ cmd = "update"
+ ripple cmd
+ # ripple try_add_feeds cmd
+ end
+
+ def self.restore()
+ cmd = "restore"
+ ripple cmd
+ # ripple try_add_feeds cmd
+ end
+
+ def self.try_add_feeds(cmd)
+ feeds = ENV['feeds']
+ feeds = 'http://build.fubu-project.org/guestAuth/app/nuget/v1/FeedService.svc/#http://packages.nuget.org/v1/FeedService.svc/#http://nuget.org/api/v2' if feeds.nil?
+
+ cmd = cmd + " --feeds #{feeds}" unless feeds.nil?
+ cmd
+ end
+
+ def self.ripple(args)
+ ripple = Platform.runtime("buildsupport/ripple.exe")
+ sh "#{ripple} #{args}"
+ end
View
1  buildsupport/run-git.cmd
@@ -0,0 +1 @@
+git %*
View
1  buildsupport/run-rake.cmd
@@ -0,0 +1 @@
+rake %*
View
7 buildsupport/run_in_path.cmd
@@ -0,0 +1,7 @@
+@ECHO OFF
+SETLOCAL
+SET WD=%1
+
+PUSHD %WD%
+%2 %3 %4 %5 %6 %7 %8 %9
+POPD%
View
97 buildsupport/sphinx.rb
@@ -0,0 +1,97 @@
+namespace :docs do
+
+ DOC_DIR="docs"
+ DOCS_BUILD_DIR="#{DOC_DIR}/build"
+ DOC_SOURCE="#{DOC_DIR}/source"
+ SPHINXOPTS=ENV['SPHINXOPTS']
+ ALLSPHINXOPTS="#{SPHINXOPTS} -d #{DOCS_BUILD_DIR}/doctrees #{DOC_SOURCE}"
+
+ def run_sphinx(args)
+ sh %{sphinx-build #{args}} do |ok, res|
+ if ! ok
+ p res
+ end
+ end
+ end
+
+ desc "Cleans the built documentation directories"
+ task :clean do
+ rm_rf "#{DOCS_BUILD_DIR}"
+ end
+
+ desc "Make standalone HTML files"
+ task :html do
+ run_sphinx "-b html #{ALLSPHINXOPTS} #{DOCS_BUILD_DIR}/html"
+ end
+
+ #desc "to make HTML files named index.html in directories"
+ #task :dirhtml do
+ #end
+
+ desc "Make a single large HTML file"
+ task :singlehtml do
+ run_sphinx "-b singlehtml #{ALLSPHINXOPTS} #{DOCS_BUILD_DIR}/singlehtml"
+ end
+
+ #desc "to make pickle files"
+ #task :pickle do
+ #end
+
+ desc "Make JSON files"
+ task :json do
+ run_sphinx "-b json #{ALLSPHINXOPTS} #{DOCS_BUILD_DIR}/json"
+ end
+
+ #desc "to make HTML files and a HTML help project"
+ #task :htmlhelp do
+ #end
+
+ #desc "to make HTML files and a qthelp project"
+ #task :qthelp do
+ #end
+
+ #desc "to make HTML files and a Devhelp project"
+ #task :devhelp do
+ #end
+
+ desc "Make an epub"
+ task :epub do
+ run_sphinx "-b epub #{ALLSPHINXOPTS} #{DOCS_BUILD_DIR}/epub"
+ end
+
+ desc "Make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ task :latex do
+ run_sphinx "-b latex #{ALLSPHINXOPTS} #{DOCS_BUILD_DIR}/latex"
+ end
+
+ desc "Make LaTeX files and run them through pdflatex"
+ task :latexpdf do
+ run_sphinx "-b latex #{ALLSPHINXOPTS} #{DOCS_BUILD_DIR}/latex"
+ puts "Running LaTeX files through pdflatex..."
+ sh "make -C $(DOCS_BUILD_DIR)/latex all-pdf"
+ end
+
+ desc "Make text files"
+ task :text do
+ run_sphinx "-b text #{ALLSPHINXOPTS} #{DOCS_BUILD_DIR}/text"
+ end
+
+ #desc "to make manual pages"
+ #task :man do
+ #end
+
+ desc "Make an overview of all changed/added/deprecated items"
+ task :changes do
+ run_sphinx "-b changes #{ALLSPHINXOPTS} #{DOCS_BUILD_DIR}/changes"
+ end
+
+ desc "Check all external links for integrity"
+ task :linkcheck do
+ run_sphinx "-b linkcheck #{ALLSPHINXOPTS} #{DOCS_BUILD_DIR}/linkcheck"
+ end
+
+ desc "Run all doctests embedded in the documentation (if enabled)"
+ task :doctest do
+ run_sphinx "-b doctest #{ALLSPHINXOPTS} #{DOCS_BUILD_DIR}/doctest"
+ end
+end
View
1  ripple.cmd
@@ -0,0 +1 @@
+buildsupport\ripple.exe %*
View
21 ripple.config
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<ripple xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <Name>fluent-nhibernate</Name>
+ <NugetSpecFolder>packaging/nuget</NugetSpecFolder>
+ <SourceFolder>src</SourceFolder>
+ <BuildCommand>rake</BuildCommand>
+ <FastBuildCommand>rake compile</FastBuildCommand>
+ <Floats>
+ <string>Bottles</string>
+ <string>Bottles.Deployers.IIS</string>
+ <string>Bottles.Deployment</string>
+ <string>Bottles.Tools</string>
+ <string>FubuCore</string>
+ <string>FubuLocalization</string>
+ <string>FubuTestingSupport</string>
+ <string>HtmlTags</string>
+ <string>Milkman</string>
+ <string>Storyteer</string>
+ <string>Storyteller</string>
+ </Floats>
+</ripple>

0 comments on commit b6c5738

Please sign in to comment.
Something went wrong with that request. Please try again.