vitaliel / shelper

Ruby jabber agent to help system administrators. Configure your servers from your favorite IM.

This URL has Read+Write access

vitaliel (author)
Tue Jan 27 10:32:29 -0800 2009
commit  cff000d4016db114b25300b93d99f6466029a80b
tree    fca0fc532ecc5ef73bc31cc05c96814e21bb3ac6
parent  69ee63ac43fcb1b4586f2d327b49561ccee70821
shelper / Rakefile
100644 39 lines (31 sloc) 0.873 kb
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
require 'rake/testtask'
 
$: << File.expand_path(File.dirname(__FILE__) + '/lib')
 
task :default => :test
require 'shelper/version'
 
ENV['EDITOR'] = "nano"
branch = "deb"
 
task :test do
  Rake::TestTask.new do |t|
    t.libs << "test"
    t.test_files = FileList['test/*test.rb']
    t.verbose = true
  end
end
 
task :tar do
  file = "shelper-" << SHelper::VERSION::STRING << ".tar.gz"
  puts "Creating #{file}"
  sh("git archive --format=tar --prefix='" << File.basename(File.expand_path('.')) << "/' HEAD | gzip -9 > ../" << file)
end
 
task :deb_dch do
  sh "git checkout " << branch
  sh "git rebase work"
  sh "git-dch --debian-branch #{branch} --since=debian/0.1.0-3 --snapshot"
  sh "git commit -a -m snapshot"
end
 
task :deb => :deb_dch do
  sh "git-buildpackage --git-debian-branch=" << branch
  dir = Dir.pwd
  cd ".."
  sh "export_debs && rsync_debs"
  cd dir
end