-
Notifications
You must be signed in to change notification settings - Fork 73
/
Rakefile
33 lines (27 loc) · 1.05 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
#
NAME = 'eNovance-ceph'
TDIR = File.expand_path(File.dirname(__FILE__))
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
require 'puppet-syntax/tasks/puppet-syntax'
PuppetLint.configuration.fail_on_warnings = true
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_class_parameter_defaults')
exclude_tests_paths = ['pkg/**/*','vendor/**/*','spec/**/*','examples/**/*']
PuppetLint.configuration.ignore_paths = exclude_tests_paths
PuppetSyntax.exclude_paths = exclude_tests_paths
desc "Validate the metadata.json syntax"
task :validate_metadata_json do
$stderr.puts "---> syntax:metadata.json"
sh "metadata-json-lint metadata.json"
end
task(:default).clear
task :default => [:syntax,:lint,:validate_metadata_json,:spec]
namespace :module do
desc "Build #{NAME} module (in a clean env) Please use this for puppetforge"
task :build do
exec "rsync -rv --exclude-from=#{TDIR}/.forgeignore . /tmp/#{NAME};cd /tmp/#{NAME};puppet module build"
end
end