-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
Rakefile
61 lines (51 loc) · 1.47 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
require 'rake'
require 'rake/clean'
require 'rubygems'
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'cucumber'
require 'cucumber/rake/task'
require 'fileutils'
CLEAN.include('pkg/', 'tmp/')
CLOBBER.include('Gemfile.lock')
$LOAD_PATH.unshift(File.expand_path('lib', __dir__))
require 'puppet_blacksmith/version'
task default: %i[clean spec cucumber build]
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = '--tag ~live'
end
Cucumber::Rake::Task.new(:cucumber) do |t|
end
task :bump do
v = Gem::Version.new("#{Blacksmith::VERSION}.0")
raise("Unable to increase prerelease version #{Blacksmith::VERSION}") if v.prerelease?
s = <<~EOS
module Blacksmith
VERSION = #{v.bump}
end
EOS
File.open('lib/puppet_blacksmith/version.rb', 'w') do |file|
file.print s
end
sh 'git add version'
sh "git commit -m 'Bump version'"
end
begin
require 'rubygems'
require 'github_changelog_generator/task'
rescue LoadError
# github_changelog_generator is an optional group
else
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
config.exclude_labels = %w[duplicate question invalid wontfix wont-fix skip-changelog github_actions]
config.user = 'voxpupuli'
config.project = 'puppet-blacksmith'
gem_version = Gem::Specification.load("#{config.project}.gemspec").version
config.future_release = gem_version
end
end
begin
require 'voxpupuli/rubocop/rake'
rescue LoadError
# the voxpupuli-rubocop gem is optional
end