Rakefile
author Mahlon E. Smith <mahlon@martini.nu>
Thu, 25 Dec 2008 07:33:20 +0000
branchmahlon-misc
changeset 10 b1426511fb64
parent 9 4c51ebe6e9b6
permissions -rw-r--r--
Merged changes from trunk@4:8.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
     1
#!rake
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
     2
#
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
     3
# jparallel rakefile
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
     4
#
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
     5
# Based on various other Rakefiles, especially one by Ben Bleything
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
     6
#
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
     7
# Copyright (c) 2008 The FaerieMUD Consortium
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
     8
#
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
     9
# Authors:
9
4c51ebe6e9b6 * Add a mkrf monkeypatch so BSD build flags are generated correctly.
Mahlon E. Smith <mahlon@martini.nu>
parents: 0
diff changeset
    10
#  * Michael Granger and Mahlon Smith <ged@FaerieMUD.org, mahlon@martini.nu>
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    11
#
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    12
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    13
BEGIN {
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    14
	require 'pathname'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    15
	basedir = Pathname.new( __FILE__ ).dirname
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    16
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    17
	libdir = basedir + "lib"
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    18
	extdir = basedir + "ext"
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    19
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    20
	$LOAD_PATH.unshift( libdir.to_s ) unless $LOAD_PATH.include?( libdir.to_s )
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    21
	$LOAD_PATH.unshift( extdir.to_s ) unless $LOAD_PATH.include?( extdir.to_s )
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    22
}
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    23
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    24
require 'rubygems'
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    25
gem 'rake', '>= 0.8.3'
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    26
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    27
require 'rbconfig'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    28
require 'rake'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    29
require 'rake/rdoctask'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    30
require 'rake/testtask'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    31
require 'rake/packagetask'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    32
require 'rake/clean'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    33
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    34
$dryrun = false
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    35
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    36
### Config constants
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    37
BASEDIR       = Pathname.new( __FILE__ ).dirname.relative_path_from( Pathname.getwd )
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    38
BINDIR        = BASEDIR + 'bin'
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    39
LIBDIR        = BASEDIR + 'lib'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    40
EXTDIR        = BASEDIR + 'ext'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    41
DOCSDIR       = BASEDIR + 'docs'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    42
PKGDIR        = BASEDIR + 'pkg'
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    43
DATADIR       = BASEDIR + 'data'
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    44
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    45
PROJECT_NAME  = 'jparallel'
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    46
PKG_NAME      = PROJECT_NAME.downcase
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    47
PKG_SUMMARY   = 'A "parallel jail shell" written in Ruby'
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    48
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    49
VERSION_FILE  = LIBDIR + 'jparallel.rb'
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    50
if VERSION_FILE.exist? && buildrev = ENV['CC_BUILD_LABEL']
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    51
	PKG_VERSION = VERSION_FILE.read[ /VERSION\s*=\s*['"](\d+\.\d+\.\d+)['"]/, 1 ] + '.' + buildrev
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    52
elsif VERSION_FILE.exist?
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    53
	PKG_VERSION = VERSION_FILE.read[ /VERSION\s*=\s*['"](\d+\.\d+\.\d+)['"]/, 1 ]
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    54
else
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    55
	PKG_VERSION = '0.0.0'
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    56
end
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    57
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    58
PKG_FILE_NAME = "#{PKG_NAME.downcase}-#{PKG_VERSION}"
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    59
GEM_FILE_NAME = "#{PKG_FILE_NAME}.gem"
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    60
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    61
EXTCONF       = EXTDIR + 'extconf.rb'
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    62
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    63
ARTIFACTS_DIR = Pathname.new( ENV['CC_BUILD_ARTIFACTS'] || 'artifacts' )
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    64
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    65
TEXT_FILES    = %w( Rakefile ChangeLog README LICENSE ).collect {|filename| BASEDIR + filename }
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    66
BIN_FILES     = Pathname.glob( BINDIR + '*' ).delete_if {|item| item =~ /\.svn/ }
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    67
LIB_FILES     = Pathname.glob( LIBDIR + '**/*.rb' ).delete_if {|item| item =~ /\.svn/ }
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    68
EXT_FILES     = Pathname.glob( EXTDIR + '**/*.{c,h,rb}' ).delete_if {|item| item =~ /\.svn/ }
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    69
DATA_FILES    = Pathname.glob( DATADIR + '**/*' ).delete_if {|item| item =~ /\.svn/ }
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    70
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    71
SPECDIR       = BASEDIR + 'spec'
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    72
SPECLIBDIR    = SPECDIR + 'lib'
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    73
SPEC_FILES    = Pathname.glob( SPECDIR + '**/*_spec.rb' ).delete_if {|item| item =~ /\.svn/ } +
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    74
                Pathname.glob( SPECLIBDIR + '**/*.rb' ).delete_if {|item| item =~ /\.svn/ }
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    75
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    76
TESTDIR       = BASEDIR + 'tests'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    77
TEST_FILES    = Pathname.glob( TESTDIR + '**/*.tests.rb' ).delete_if {|item| item =~ /\.svn/ }
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    78
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    79
RAKE_TASKDIR  = BASEDIR + 'rake'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    80
RAKE_TASKLIBS = Pathname.glob( RAKE_TASKDIR + '*.rb' )
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    81
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    82
LOCAL_RAKEFILE = BASEDIR + 'Rakefile.local'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    83
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    84
EXTRA_PKGFILES = []
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    85
EXTRA_PKGFILES.concat Pathname.glob( BASEDIR + 'examples/*.{c,rb}' ).delete_if {|item| item =~ /\.svn/ } 
9
4c51ebe6e9b6 * Add a mkrf monkeypatch so BSD build flags are generated correctly.
Mahlon E. Smith <mahlon@martini.nu>
parents: 0
diff changeset
    86
EXTRA_PKGFILES.concat Pathname.glob( BASEDIR + 'misc/monkeypatches.rb' ).delete_if {|item| item =~ /\.svn/ }
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    87
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    88
RELEASE_FILES = TEXT_FILES + 
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    89
	SPEC_FILES + 
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    90
	TEST_FILES + 
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    91
	BIN_FILES +
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    92
	LIB_FILES + 
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    93
	EXT_FILES + 
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
    94
	DATA_FILES + 
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    95
	RAKE_TASKLIBS +
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    96
	EXTRA_PKGFILES
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    97
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    98
RELEASE_FILES << LOCAL_RAKEFILE if LOCAL_RAKEFILE.exist?
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
    99
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   100
COVERAGE_MINIMUM = ENV['COVERAGE_MINIMUM'] ? Float( ENV['COVERAGE_MINIMUM'] ) : 85.0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   101
RCOV_EXCLUDES = 'spec,tests,/Library/Ruby,/var/lib,/usr/local/lib'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   102
RCOV_OPTS = [
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   103
	'--exclude', RCOV_EXCLUDES,
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   104
	'--xrefs',
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   105
	'--save',
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   106
	'--callsites',
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   107
	#'--aggregate', 'coverage.data' # <- doesn't work as of 0.8.1.2.0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   108
  ]
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   109
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   110
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   111
# Subversion constants -- directory names for releases and tags
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   112
SVN_TRUNK_DIR    = 'trunk'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   113
SVN_RELEASES_DIR = 'releases'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   114
SVN_BRANCHES_DIR = 'branches'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   115
SVN_TAGS_DIR     = 'tags'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   116
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   117
SVN_DOTDIR       = BASEDIR + '.svn'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   118
SVN_ENTRIES      = SVN_DOTDIR + 'entries'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   119
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   120
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   121
### Load some task libraries that need to be loaded early
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   122
require RAKE_TASKDIR + 'helpers.rb'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   123
require RAKE_TASKDIR + 'svn.rb'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   124
require RAKE_TASKDIR + 'verifytask.rb'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   125
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   126
# Define some constants that depend on the 'svn' tasklib
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   127
PKG_BUILD = get_svn_rev( BASEDIR ) || 0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   128
SNAPSHOT_PKG_NAME = "#{PKG_FILE_NAME}.#{PKG_BUILD}"
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   129
SNAPSHOT_GEM_NAME = "#{SNAPSHOT_PKG_NAME}.gem"
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   130
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   131
# Documentation constants
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   132
RDOCDIR = DOCSDIR + 'api'
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   133
RDOC_OPTIONS = [
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   134
	'-w', '4',
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   135
	'-SHN',
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   136
	'-i', '.',
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   137
	'-m', 'README',
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   138
	'-W', 'http://deveiate.org/projects/jParallel//browser/trunk/'
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   139
  ]
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   140
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   141
# Release constants
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   142
SMTP_HOST = 'mail.faeriemud.org'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   143
SMTP_PORT = 465 # SMTP + SSL
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   144
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   145
# Project constants
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   146
PROJECT_HOST = 'deveiate.org'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   147
PROJECT_PUBDIR = "/usr/local/www/public/code"
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   148
PROJECT_DOCDIR = "#{PROJECT_PUBDIR}/#{PKG_NAME}"
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   149
PROJECT_SCPPUBURL = "#{PROJECT_HOST}:#{PROJECT_PUBDIR}"
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   150
PROJECT_SCPDOCURL = "#{PROJECT_HOST}:#{PROJECT_DOCDIR}"
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   151
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   152
# Rubyforge stuff
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   153
RUBYFORGE_GROUP = 'deveiate'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   154
RUBYFORGE_PROJECT = 'jparallel'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   155
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   156
# Gem dependencies: gemname => version
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   157
DEPENDENCIES = {
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   158
}
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   159
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   160
# Developer Gem dependencies: gemname => version
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   161
DEVELOPMENT_DEPENDENCIES = {
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   162
	'amatch'      => '>= 0.2.3',
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   163
	'rake'        => '>= 0.8.1',
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   164
	'rcodetools'  => '>= 0.7.0.0',
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   165
	'rcov'        => '>= 0',
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   166
	'RedCloth'    => '>= 4.0.3',
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   167
	'rspec'       => '>= 0',
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   168
	'rubyforge'   => '>= 0',
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   169
	'termios'     => '>= 0',
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   170
	'text-format' => '>= 1.0.0',
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   171
	'tmail'       => '>= 1.2.3.1',
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   172
	'ultraviolet' => '>= 0.10.2',
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   173
	'libxml-ruby' => '>= 0.8.3',
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   174
}
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   175
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   176
# Non-gem requirements: packagename => version
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   177
REQUIREMENTS = {
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   178
	'FreeBSD' => '>= 5.0',
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   179
}
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   180
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   181
# RubyGem specification
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   182
GEMSPEC   = Gem::Specification.new do |gem|
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   183
	gem.name              = PKG_NAME.downcase
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   184
	gem.version           = PKG_VERSION
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   185
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   186
	gem.summary           = PKG_SUMMARY
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   187
	gem.description       = <<-EOD
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   188
	This is shell that can be used to interact with multiple FreeBSD jail instances
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   189
	simultaneously. It includes a Ruby binding to the FreeBSD jail(2) functions.
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   190
	EOD
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   191
9
4c51ebe6e9b6 * Add a mkrf monkeypatch so BSD build flags are generated correctly.
Mahlon E. Smith <mahlon@martini.nu>
parents: 0
diff changeset
   192
	gem.authors           = 'Michael Granger and Mahlon Smith'
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   193
	gem.email             = 'ged@FaerieMUD.org, mahlon@martini.nu'
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   194
	gem.homepage          = 'http://deveiate.org/projects/jParallel/'
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   195
	gem.rubyforge_project = RUBYFORGE_PROJECT
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   196
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   197
	gem.has_rdoc          = true
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   198
	gem.rdoc_options      = RDOC_OPTIONS
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   199
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   200
	gem.bindir            = BINDIR.relative_path_from(BASEDIR).to_s
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   201
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   202
	if EXTCONF.exist?
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   203
		gem.extensions << EXTCONF.relative_path_from( BASEDIR ).to_s
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   204
	end
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   205
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   206
	gem.files             = RELEASE_FILES.
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   207
		collect {|f| f.relative_path_from(BASEDIR).to_s }
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   208
	gem.test_files        = SPEC_FILES.
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   209
		collect {|f| f.relative_path_from(BASEDIR).to_s }
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   210
		
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   211
	DEPENDENCIES.each do |name, version|
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   212
		version = '>= 0' if version.length.zero?
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   213
		gem.add_runtime_dependency( name, version )
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   214
	end
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   215
	
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   216
	# Developmental dependencies don't work as of RubyGems 1.2.0
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   217
	unless Gem::Version.new( Gem::RubyGemsVersion ) <= Gem::Version.new( "1.2.0" )
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   218
		DEVELOPMENT_DEPENDENCIES.each do |name, version|
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   219
			version = '>= 0' if version.length.zero?
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   220
			gem.add_development_dependency( name, version )
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   221
		end
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   222
	end
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   223
	
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   224
	REQUIREMENTS.each do |name, version|
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   225
		gem.requirements << [ name, version ].compact.join(' ')
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   226
	end
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   227
end
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   228
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   229
# Manual-generation config
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   230
MANUALDIR = DOCSDIR + 'manual'
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   231
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   232
$trace = Rake.application.options.trace ? true : false
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   233
$dryrun = Rake.application.options.dryrun ? true : false
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   234
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   235
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   236
# Load any remaining task libraries
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   237
RAKE_TASKLIBS.each do |tasklib|
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   238
	next if tasklib =~ %r{/(helpers|svn|verifytask)\.rb$}
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   239
	begin
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   240
		require tasklib
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   241
	rescue ScriptError => err
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   242
		fail "Task library '%s' failed to load: %s: %s" %
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   243
			[ tasklib, err.class.name, err.message ]
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   244
		trace "Backtrace: \n  " + err.backtrace.join( "\n  " )
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   245
	rescue => err
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   246
		log "Task library '%s' failed to load: %s: %s. Some tasks may not be available." %
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   247
			[ tasklib, err.class.name, err.message ]
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   248
		trace "Backtrace: \n  " + err.backtrace.join( "\n  " )
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   249
	end
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   250
end
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   251
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   252
# Load any project-specific rules defined in 'Rakefile.local' if it exists
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   253
import LOCAL_RAKEFILE if LOCAL_RAKEFILE.exist?
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   254
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   255
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   256
#####################################################################
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   257
###	T A S K S 	
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   258
#####################################################################
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   259
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   260
### Default task
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   261
task :default  => [:clean, :local, :spec, :rdoc, :package]
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   262
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   263
### Task the local Rakefile can append to -- no-op by default
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   264
task :local
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   265
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   266
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   267
### Task: clean
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   268
CLEAN.include 'coverage'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   269
CLOBBER.include 'artifacts', 'coverage.info', PKGDIR
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   270
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   271
# Target to hinge on ChangeLog updates
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   272
file SVN_ENTRIES
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   273
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   274
### Task: changelog
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   275
file 'ChangeLog' => SVN_ENTRIES.to_s do |task|
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   276
	log "Updating #{task.name}"
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   277
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   278
	changelog = make_svn_changelog()
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   279
	File.open( task.name, 'w' ) do |fh|
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   280
		fh.print( changelog )
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   281
	end
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   282
end
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   283
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   284
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   285
### Task: cruise (Cruisecontrol task)
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   286
desc "Cruisecontrol build"
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   287
task :cruise => [:clean, 'spec:quiet', :package] do |task|
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   288
	raise "Artifacts dir not set." if ARTIFACTS_DIR.to_s.empty?
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   289
	artifact_dir = ARTIFACTS_DIR.cleanpath + ENV['CC_BUILD_LABEL']
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   290
	artifact_dir.mkpath
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   291
	
10
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   292
	coverage = BASEDIR + 'coverage'
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   293
	if coverage.exist? && coverage.directory?
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   294
		$stderr.puts "Copying coverage stats..."
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   295
		FileUtils.cp_r( 'coverage', artifact_dir )
b1426511fb64 Merged changes from trunk@4:8.
Mahlon E. Smith <mahlon@martini.nu>
parents: 9
diff changeset
   296
	end
0
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   297
	
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   298
	$stderr.puts "Copying packages..."
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   299
	FileUtils.cp_r( FileList['pkg/*'].to_a, artifact_dir )
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   300
end
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   301
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   302
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   303
desc "Update the build system to the latest version"
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   304
task :update_build do
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   305
	log "Updating the build system"
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   306
	sh 'svn', 'up', RAKE_TASKDIR
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   307
	log "Updating the Rakefile"
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   308
	sh 'rake', '-f', RAKE_TASKDIR + 'Metarakefile'
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   309
end
92d00ff32c56 Initial checkin
Michael Granger <ged@FaerieMUD.org>
parents:
diff changeset
   310