forked from Katello/hammer-cli-katello
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
43 lines (34 loc) · 1.04 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
require 'rake/testtask'
require 'bundler/gem_tasks'
# require 'ci/reporter/rake/minitest'
Rake::TestTask.new do |t|
t.libs << "lib"
t.test_files = Dir.glob('test/**/*_test.rb')
t.verbose = true
end
begin
require 'rubocop/rake_task'
Rubocop::RakeTask.new
desc "Runs Rubocop style checker with xml output for Jenkins"
task 'rubocop:jenkins' do
system("bundle exec rubocop \
--require rubocop/formatter/checkstyle_formatter \
--format Rubocop::Formatter::CheckstyleFormatter \
--no-color --out rubocop.xml")
end
rescue => _
puts "Rubocop not loaded."
end
task :default do
Rake::Task['rubocop'].execute
end
namespace :gettext do
desc "Update pot file"
task :find do
require "hammer_cli_katello/version"
require "hammer_cli_katello/i18n"
require 'gettext/tools'
domain = HammerCLIKatello::I18n::LocaleDomain.new
GetText.update_pofiles(domain.domain_name, domain.translated_files, "#{domain.domain_name} #{HammerCLIKatello.version.to_s}", :po_root => domain.locale_dir)
end
end