forked from theforeman/hammer-cli-foreman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
41 lines (33 loc) · 1006 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
require 'rake/testtask'
require 'bundler/gem_tasks'
require 'ci/reporter/rake/minitest'
Rake::TestTask.new do |t|
t.libs.push "lib"
t.test_files = Dir.glob('test/**/*_test.rb')
t.verbose = true
end
namespace :gettext do
task :setup do
require "hammer_cli_foreman/version"
require "hammer_cli_foreman/i18n"
require 'gettext/tools/task'
domain = HammerCLIForeman::I18n::LocaleDomain.new
GetText::Tools::Task.define do |task|
task.package_name = domain.domain_name
task.package_version = HammerCLIForeman.version.to_s
task.domain = domain.domain_name
task.mo_base_directory = domain.locale_dir
task.po_base_directory = domain.locale_dir
task.files = domain.translated_files
task.msgmerge_options='--no-fuzzy-matching'
end
end
desc "Update pot file"
task :find => [:setup] do
Rake::Task["gettext:po:update"].invoke
end
end
namespace :pkg do
desc 'Generate package source gem'
task :generate_source => :build
end