-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathRakefile
39 lines (31 loc) · 788 Bytes
/
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
require 'rdoc/task'
require 'rspec/core/rake_task'
require 'pathname'
ROOT = Pathname(__FILE__).parent
load ROOT + "lib/i2c.rb"
warn "I2CDevice::VERSION = #{I2CDevice::VERSION}"
RSpec::Core::RakeTask.new(:spec)
task :default => :spec
task :release do
sh %{rspec}
tags = `git tag`.split(/\n/)
if tags.include? I2CDevice::VERSION
raise "Already exist tag #{I2CDevice::VERSION}"
end
sh %{gem build i2c-devices.gemspec}
sh %{gem push i2c-devices-#{I2CDevice::VERSION}.gem}
sh %{git add -u}
sh %{git commit -m '#{I2CDevice::VERSION}'}
sh %{git tag #{I2CDevice::VERSION}}
sh %{git push}
sh %{git push --tags}
end
RDoc::Task.new do |rdoc|
rdoc.main = "README.md"
rdoc.rdoc_files.include(
"README.md",
"lib/**/*.rb"
)
# --format=
# rdoc.generator = 'bootstrap'
end