Sha256: 294f099adedb1d26ddfd051304a30ff8b8c39a6a0f27ed9ef424fcefa46a05c4
Contents?: true
Size: 737 Bytes
Versions: 3
Compression:
Stored size: 737 Bytes
Contents
require 'git' require 'structured_changelog' require 'structured_changelog/release_preview' desc "View the release section changelog:compile would insert into the changelog without actually doing so" task 'changelog:preview', [:repo_path, :changelog_path] do |_task, arguments| repo_path = arguments.to_h.fetch(:repo_path) { Pathname.pwd } changelog_path = arguments.to_h.fetch(:changelog_path) { Pathname.pwd/"CHANGELOG.md" } changelog = StructuredChangelog.new(changelog_path) release_preview = StructuredChangelog::ReleasePreview.new( changelog: changelog, repo: Git.open(repo_path), ) abort("No release notes since the last release") if release_preview.empty? puts release_preview.to_s end
Version data entries
3 entries across 3 versions & 1 rubygems