forked from cedric/custom_counter_cache
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
31 lines (25 loc) · 711 Bytes
/
Rakefile
File metadata and controls
31 lines (25 loc) · 711 Bytes
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
# -*- encoding: utf-8 -*-
$LOAD_PATH << File.dirname(__FILE__)
require 'rake/testtask'
require 'lib/custom_counter_cache/version'
namespace :gem do
desc 'Run tests.'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/*_test.rb'
test.verbose = true
end
desc 'Build gem.'
task build: :test do
system "gem build custom_counter_cache.gemspec"
end
desc 'Build, tag and push gem.'
task release: :build do
# tag and push
system "git tag v#{CustomCounterCache::VERSION}"
system "git push origin --tags"
# push gem
system "gem push custom_counter_cache-#{CustomCounterCache::VERSION}.gem"
end
end
task default: 'gem:test'