-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
58 lines (52 loc) · 1.56 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
54
55
56
57
58
require 'rubygems'
require 'rake/gempackagetask'
require 'rake/rdoctask'
begin
require 'bundler'
rescue LoadError
puts 'Bundler not available. Install it with: [sudo] gem install bundler'
end
begin
require 'jeweler'
rescue LoadError
puts 'Jeweler not available. Install it with: [sudo] gem install jeweler'
end
task :default => :gemspec
Jeweler::Tasks.new do |gemspec|
gemspec.name = 'fotki-export'
gemspec.summary = 'Fotki.com photo export tool.'
gemspec.description = 'Simple command line tool to download all your photos from Fotki.com'
gemspec.email = '[email protected]'
gemspec.homepage = 'https://github.com/cloocher/fotki-export'
gemspec.authors = ['Gene Drabkin']
gemspec.files = FileList['fotki-export.gemspec', 'Rakefile', 'README', 'VERSION', 'lib/**/*', 'bin/**/*']
gemspec.add_dependency 'watir-webdriver', '>= 0.2.2'
gemspec.executables = ['fotki-export']
gemspec.requirements = ['none']
gemspec.bindir = 'bin'
gemspec.add_bundler_dependencies
end
desc 'Release gem'
task :'release:gem' do
%x(
rake gemspec
rake build
rake install
git add .
)
puts 'Commit message:'
message = STDIN.gets
version = File.exist?('VERSION') ? File.read('VERSION') : ''
%x(
git commit -m '#{message}'
git push origin master
gem push pkg/fotki-export-#{version}.gem
)
end
Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ''
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "fotki-export #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end