Files
news.gitea.happylizard.me/bin/gems/bump-0.10.0/lib/bump/tasks.rb
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

46 lines
1.2 KiB
Ruby

# frozen_string_literal: true
require "bump"
namespace :bump do
run_bump = lambda do |bump, options|
output, status = Bump::Bump.run(bump, options)
puts output
abort unless status == 0
end
(Bump::Bump::BUMPS + ["current", "file", "show-next"]).each do |bump|
if bump == "current"
desc "Show current gem version"
elsif bump == "show-next"
desc "Show next #{Bump::Bump::BUMPS.join('|')} version."
elsif bump == "file"
desc "Show version file path"
else
desc "Bump #{bump} part of gem version"
end
task bump, :no_args do |_task, args|
if args.no_args
raise(
RakeArgumentsDeprecatedError,
"rake arguments are deprecated, use TAG=false to disable tagging"
)
end
options = {
tag: ENV['TAG'],
tag_prefix: ENV['TAG_PREFIX'],
commit: ENV['COMMIT'],
bundle: ENV['BUNDLE'],
increment: ENV['INCREMENT']
}
run_bump.call(bump, Bump::Bump.parse_cli_options!(options))
end
end
desc "Sets the version number using the VERSION environment variable"
task :set do
run_bump.call("set", version: ENV['VERSION'])
end
end