-
Notifications
You must be signed in to change notification settings - Fork 28
/
Rakefile
42 lines (33 loc) · 985 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
40
41
42
require "bundler/gem_tasks"
require 'rake/testtask'
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
require "measured/version"
task default: :test
desc 'Run the test stuite'
Rake::TestTask.new do |t|
files = ARGV[1..-1]
files = "test/**/*_test.rb" if !files || files.length == 0
t.libs << "test"
t.libs << "lib/**/*"
t.test_files = FileList[files]
t.verbose = true
end
task tag: :build do
system "git commit -m'Released version #{ Measured::VERSION }' --allow-empty"
system "git tag -a v#{ Measured::VERSION } -m 'Tagging #{ Measured::VERSION }'"
system "git push --tags"
end
task :environment do
require 'measured'
end
namespace :cache do
task write: :environment do
class Measured::Cache::Json
prepend Measured::Cache::JsonWriter
end
puts "Updating cache files:"
Measured::Measurable.subclasses.each do |measurable|
puts " #{measurable} - #{measurable.unit_system.update_cache ? 'ok' : 'skipped'}"
end
end
end