File: Rakefile

package info (click to toggle)
puppet 2.6.2-5%2Bsqueeze10
  • links: PTS, VCS
  • area: main
  • in suites: squeeze-lts
  • size: 13,728 kB
  • ctags: 8,726
  • sloc: ruby: 110,196; sh: 937; lisp: 263; xml: 122; sql: 103; makefile: 90; python: 84
file content (54 lines) | stat: -rw-r--r-- 1,165 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Rakefile for Puppet -*- ruby -*-

$LOAD_PATH << File.join(File.dirname(__FILE__), 'tasks')

require 'rake'
require 'rake/packagetask'
require 'rake/gempackagetask'
require 'spec'
require 'spec/rake/spectask'

module Puppet
    PUPPETVERSION = File.read('lib/puppet.rb')[/PUPPETVERSION *= *'(.*)'/,1] or fail "Couldn't find PUPPETVERSION"
end

Dir['tasks/**/*.rake'].each { |t| load t }

FILES = FileList[
    '[A-Z]*',
    'install.rb',
    'bin/**/*',
    'sbin/**/*',
    'lib/**/*',
    'conf/**/*',
    'man/**/*',
    'examples/**/*',
    'ext/**/*',
    'tasks/**/*',
    'test/**/*',
    'spec/**/*'
]

Rake::PackageTask.new("puppet", Puppet::PUPPETVERSION) do |pkg|
    pkg.package_dir = 'pkg'
    pkg.need_tar_gz = true
    pkg.package_files = FILES.to_a
end

task :default do
    sh %{rake -T}
end

desc "Create the tarball and the gem - use when releasing"
task :puppetpackages => [:create_gem, :package]

Spec::Rake::SpecTask.new do |t|
    t.spec_opts = ['--format','s', '--loadby','mtime','--color']
    t.pattern ='spec/{unit,integration}/**/*.rb'
    t.fail_on_error = false
end

desc "Run the unit tests"
task :unit do
    sh "cd test; rake"
end