~ubuntu-branches/ubuntu/trusty/facter/trusty

« back to all changes in this revision

Viewing changes to Rakefile

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Pollock, Nigel Kersten, Andrew Pollock
  • Date: 2009-04-13 15:20:21 UTC
  • mfrom: (1.1.5 upstream) (3.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090413152021-t3uagjamr3ee4njl
Tags: 1.5.4-1
[ Nigel Kersten ]
* New upstream release
* Switch maintainer to pkg-puppet-devel list
* Modify uploaders
* Update watch file regexp to exclude release canditate tarballs
* Use upstream install.rb script to build rather than copying manually

[ Andrew Pollock ]
* debian/control: add libopenssl-ruby to build dependencies
* debian/control: bump Standards-Version (no changes)
* debian/compat: increase to 5
* debian/control: add pciutils and ${misc:Depends} to dependencies

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Rakefile for facter
2
2
 
 
3
$LOAD_PATH << File.join(File.dirname(__FILE__), 'tasks')
 
4
 
3
5
begin 
4
6
    require 'rake/reductive'
5
7
rescue LoadError
27
29
        'etc/*'
28
30
    ]
29
31
 
30
 
    #p.epmhosts = %w{culain}
31
 
    #p.rpmhost = "fedora1"
32
 
    #p.sunpkghost = "sol10b"
33
32
end
34
33
 
35
34
project.mkgemtask do |gem|
42
41
    gem.author = "Luke Kanies"
43
42
end
44
43
 
45
 
if project.has?(:epm)
46
 
    project.mkepmtask do |task|
47
 
        task.bins = FileList.new("bin/facter")
48
 
        task.rubylibs = FileList.new('lib/**/*')          
49
 
    end
50
 
end
51
 
 
52
44
task :archive do
53
45
    raise ArgumentError, "You must specify the archive name by setting ARCHIVE; e.g., ARCHIVE=1.5.1rc1" unless archive = ENV["ARCHIVE"]
54
46
 
55
47
    sh "git archive --format=tar  --prefix=facter-#{archive}/ HEAD | gzip -c > facter-#{archive}.tgz"
56
48
end
 
49
 
 
50
namespace :ci do
 
51
 
 
52
  desc "Run the CI prep tasks"
 
53
  task :prep do
 
54
    require 'rubygems'
 
55
    gem 'ci_reporter'
 
56
    require 'ci/reporter/rake/rspec'
 
57
    require 'ci/reporter/rake/test_unit'
 
58
    ENV['CI_REPORTS'] = 'results'
 
59
  end
 
60
 
 
61
  desc "Run CI RSpec tests"
 
62
  task :spec => [:prep, 'ci:setup:rspec'] do
 
63
     sh "cd spec; rake all; exit 0"
 
64
  end
 
65
 
 
66
end
 
67
 
 
68
desc "Send patch information to the puppet-dev list"
 
69
task :mail_patches do
 
70
    if Dir.glob("00*.patch").length > 0
 
71
        raise "Patches already exist matching '00*.patch'; clean up first"
 
72
    end
 
73
 
 
74
    unless %x{git status} =~ /On branch (.+)/
 
75
        raise "Could not get branch from 'git status'"
 
76
    end
 
77
    branch = $1
 
78
    
 
79
    unless branch =~ %r{^([^\/]+)/([^\/]+)/([^\/]+)$}
 
80
        raise "Branch name does not follow <type>/<parent>/<name> model; cannot autodetect parent branch"
 
81
    end
 
82
 
 
83
    type, parent, name = $1, $2, $3
 
84
 
 
85
    # Create all of the patches
 
86
    sh "git format-patch -C -M -s -n #{parent}..HEAD"
 
87
 
 
88
    # And then mail them out.
 
89
 
 
90
    # If we've got more than one patch, add --compose
 
91
    if Dir.glob("00*.patch").length > 1
 
92
        compose = "--compose"
 
93
    else
 
94
        compose = ""
 
95
    end
 
96
 
 
97
    # Now send the mail.
 
98
    sh "git send-email #{compose} --no-chain-reply-to --no-signed-off-by-cc --suppress-from --no-thread --to puppet-dev@googlegroups.com 00*.patch"
 
99
 
 
100
    # Finally, clean up the patches
 
101
    sh "rm 00*.patch"
 
102
end