-
Notifications
You must be signed in to change notification settings - Fork 119
/
Rakefile
37 lines (30 loc) · 991 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
# frozen_string_literal: true
require 'riemann/tools/version'
require 'bundler/gem_tasks'
require 'github_changelog_generator/task'
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
config.user = 'riemann'
config.project = 'riemann-tools'
config.exclude_labels = %w[dependencies skip-changelog]
config.future_release = "v#{Riemann::Tools::VERSION}"
end
desc 'Recursively build all gems'
task :rbuild do
Dir.glob('tools/**') do |dir|
Dir.chdir(dir)
sh 'rake gem'
Dir.chdir('../..')
end
end
Rake::Task['build'].enhance(['gen_parser'])
desc 'Generate parsers'
task gen_parser: [
'lib/riemann/tools/mdstat_parser.tab.rb',
'lib/riemann/tools/uptime_parser.tab.rb',
]
file 'lib/riemann/tools/mdstat_parser.tab.rb' => 'lib/riemann/tools/mdstat_parser.y' do
sh 'racc -S lib/riemann/tools/mdstat_parser.y'
end
file 'lib/riemann/tools/uptime_parser.tab.rb' => 'lib/riemann/tools/uptime_parser.y' do
sh 'racc -S lib/riemann/tools/uptime_parser.y'
end