-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
53 lines (43 loc) · 1.41 KB
/
Rakefile
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
require 'rake'
require 'rake/testtask'
require 'rake/clean'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'tools/rakehelp'
require 'fileutils'
include FileUtils
setup_tests
setup_clean ["pkg", "lib/*.bundle", "*.gem", ".config"]
setup_rdoc ['README', 'LICENSE', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
desc "Does a full compile, test run"
task :default => [:test, :package]
version="1.0.3"
name="railsmachine"
setup_gem(name, version) do |spec|
spec.summary = "The Rails Machine task library"
spec.description = spec.summary
spec.author="Rails Machine"
spec.add_dependency('capistrano', '>= 2.1.0')
spec.has_rdoc = false
spec.files += Dir.glob("bin/*")
spec.files += Dir.glob("resources/**/*")
spec.default_executable = "railsmachine"
spec.executables = ["railsmachine"]
spec.email = "support@railsmachine.com"
spec.homepage = "http://railsmachine.com/"
spec.rubyforge_project = "railsmachine"
end
task :install => [:test, :package] do
sh %{sudo gem install pkg/#{name}-#{version}.gem}
end
task :uninstall => [:clean] do
sh %{sudo gem uninstall #{name}}
end
task :gem_source do
mkdir_p "pkg/gems"
FileList["**/*.gem"].each { |gem| mv gem, "pkg/gems" }
FileList["pkg/*.tgz"].each {|tgz| rm tgz }
rm_rf "pkg/#{name}-#{version}"
sh %{ generate_yaml_index.rb -d pkg }
sh %{ scp -r pkg/* #{ENV['SSH_USER']}@rubyforge.org:/var/www/gforge-projects/railsmachine/releases/ }
end