Sha256: f137283490d14054522ac158eb1fc3519130b23b37d32a18e4a2b56169307b06

Contents?: true

Size: 868 Bytes

Versions: 17

Compression:

Stored size: 868 Bytes

Contents

# frozen_string_literal: true

autoload :Changelog, "#{__dir__}/changelog"

namespace :changelog do
  %i[new fix change].each do |type|
    desc "Create a Changelog entry (#{type})"
    task type, [:id] do |_task, args|
      ref_type = :pull if args[:id]
      path = Changelog::Entry.new(type: type, ref_id: args[:id], ref_type: ref_type).write
      cmd = "git add #{path}"
      system cmd
      puts "Entry '#{path}' created and added to git index"
    end
  end

  desc 'Merge entries and delete them'
  task :merge do
    raise 'No entries!' unless Changelog.pending?

    Changelog.new.merge!.and_delete!
    cmd = "git commit -a -m 'Update Changelog'"
    puts cmd
    system cmd
  end

  task :check_clean do
    next unless Changelog.pending?

    puts '*** Pending changelog entries!'
    puts 'Do `bundle exec rake changelog:merge`'
    exit(1)
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
rubocop-solidus-0.2.0 tasks/changelog.rake
rubocop-solidus-0.1.4 tasks/changelog.rake
rubocop-solidus-0.1.3 tasks/changelog.rake
rubocop-solidus-0.1.2 tasks/changelog.rake
rubocop-solidus-0.1.1 tasks/changelog.rake
rubocop-solidus-0.1.0 tasks/changelog.rake
rubocop-minitest-0.21.1 tasks/changelog.rake
rubocop-minitest-0.21.0 tasks/changelog.rake
rubocop-minitest-0.20.1 tasks/changelog.rake
rubocop-minitest-0.20.0 tasks/changelog.rake
rubocop-minitest-0.19.1 tasks/changelog.rake
rubocop-minitest-0.19.0 tasks/changelog.rake
rubocop-minitest-0.18.0 tasks/changelog.rake
rubocop-minitest-0.17.2 tasks/changelog.rake
rubocop-minitest-0.17.1 tasks/changelog.rake
rubocop-minitest-0.17.0 tasks/changelog.rake
rubocop-minitest-0.16.0 tasks/changelog.rake