mirror of
https://github.com/philippdieter/puppet-ldapquery.git
synced 2026-05-05 15:32:47 +00:00
Update from xaque208 modulesync_config
This commit is contained in:
60
Rakefile
60
Rakefile
@@ -1,7 +1,13 @@
|
||||
require 'puppetlabs_spec_helper/rake_tasks'
|
||||
require 'puppet_blacksmith/rake_tasks'
|
||||
require 'voxpupuli/release/rake_tasks'
|
||||
require 'puppet-strings/tasks'
|
||||
|
||||
# load optional tasks for releases
|
||||
# only available if gem group releases is installed
|
||||
begin
|
||||
require 'puppet_blacksmith/rake_tasks'
|
||||
require 'voxpupuli/release/rake_tasks'
|
||||
require 'puppet-strings/tasks'
|
||||
rescue LoadError
|
||||
end
|
||||
|
||||
PuppetLint.configuration.log_format = '%{path}:%{line}:%{check}:%{KIND}:%{message}'
|
||||
PuppetLint.configuration.fail_on_warnings = true
|
||||
@@ -20,6 +26,12 @@ exclude_paths = %w(
|
||||
PuppetLint.configuration.ignore_paths = exclude_paths
|
||||
PuppetSyntax.exclude_paths = exclude_paths
|
||||
|
||||
desc 'Auto-correct puppet-lint offenses'
|
||||
task 'lint:auto_correct' do
|
||||
PuppetLint.configuration.fix = true
|
||||
Rake::Task[:lint].invoke
|
||||
end
|
||||
|
||||
desc 'Run acceptance tests'
|
||||
RSpec::Core::RakeTask.new(:acceptance) do |t|
|
||||
t.pattern = 'spec/acceptance'
|
||||
@@ -31,13 +43,49 @@ task test: [
|
||||
:release_checks,
|
||||
]
|
||||
|
||||
desc "Run main 'test' task and report merged results to coveralls"
|
||||
task test_with_coveralls: [:test] do
|
||||
if Dir.exist?(File.expand_path('../lib', __FILE__))
|
||||
require 'coveralls/rake/task'
|
||||
Coveralls::RakeTask.new
|
||||
Rake::Task['coveralls:push'].invoke
|
||||
else
|
||||
puts 'Skipping reporting to coveralls. Module has no lib dir'
|
||||
end
|
||||
end
|
||||
|
||||
desc "Print supported beaker sets"
|
||||
task 'beaker_sets', [:directory] do |t, args|
|
||||
directory = args[:directory]
|
||||
|
||||
metadata = JSON.load(File.read('metadata.json'))
|
||||
|
||||
(metadata['operatingsystem_support'] || []).each do |os|
|
||||
(os['operatingsystemrelease'] || []).each do |release|
|
||||
if directory
|
||||
beaker_set = "#{directory}/#{os['operatingsystem'].downcase}-#{release}"
|
||||
else
|
||||
beaker_set = "#{os['operatingsystem'].downcase}-#{release}-x64"
|
||||
end
|
||||
|
||||
filename = "spec/acceptance/nodesets/#{beaker_set}.yml"
|
||||
|
||||
puts beaker_set if File.exists? filename
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
begin
|
||||
require 'github_changelog_generator/task'
|
||||
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
|
||||
version = (Blacksmith::Modulefile.new).version
|
||||
config.future_release = "#{version}"
|
||||
config.header = "# Change log\n\nAll notable changes to this project will be documented in this file.\nEach new release typically also includes the latest modulesync defaults.\nThese should not impact the functionality of the module."
|
||||
config.exclude_labels = %w{duplicate question invalid wontfix modulesync}
|
||||
config.future_release = "v#{version}" if version =~ /^\d+\.\d+.\d+$/
|
||||
config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file.\nEach new release typically also includes the latest modulesync defaults.\nThese should not affect the functionality of the module."
|
||||
config.exclude_labels = %w{duplicate question invalid wontfix wont-fix modulesync skip-changelog}
|
||||
config.user = 'voxpupuli'
|
||||
metadata_json = File.join(File.dirname(__FILE__), 'metadata.json')
|
||||
metadata = JSON.load(File.read(metadata_json))
|
||||
config.project = metadata['name']
|
||||
end
|
||||
rescue LoadError
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user