Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore github_actions label in changelog & minor RuboCop fixes in Rakefile #123

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'bundler/setup'
require 'cucumber/rake/task'
require 'rspec/core/rake_task'
Expand All @@ -16,17 +18,17 @@ Rake::TestTask.new do |test|
test.verbose = true
end

task :default => [:test, :spec, :features]
task default: [:test, :spec, :features]

desc "Bump version to the next minor"
desc 'Bump version to the next minor'
task :bump do
path = 'lib/librarian/puppet/version.rb'
version_file = File.read(path)
version = version_file.match(/VERSION = "(.*)"/)[1]
v = Gem::Version.new("#{version}.0")
new_version = v.bump.to_s
version_file = version_file.gsub(/VERSION = ".*"/, "VERSION = \"#{new_version}\"")
File.open(path, "w") {|file| file.puts version_file}
File.write(version_file)
sh "git add #{path}"
sh "git commit -m \"Bump version to #{new_version}\""
end
Expand All @@ -35,9 +37,10 @@ begin
require 'rubygems'
require 'github_changelog_generator/task'
rescue LoadError
# Part of an optional group
else
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
config.exclude_labels = %w{duplicate question invalid wontfix wont-fix skip-changelog}
config.exclude_labels = %w[duplicate question invalid wontfix wont-fix skip-changelog github_actions]
config.user = 'voxpupuli'
config.project = 'librarian-puppet'
config.since_tag = 'v3.0.1'
Expand Down
Loading