Skip to content
Merged
Show file tree
Hide file tree
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
21 changes: 21 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,27 @@ end
task default: %i[test standard]

namespace :release do
desc "Bump version (major|minor|patch|pre) and commit"
task :bump, [:level] do |_t, args|
level = args[:level] || "patch"
valid_levels = %w[major minor patch pre]

unless valid_levels.include?(level)
abort "Invalid level: #{level}. Use: #{valid_levels.join(", ")}"
end

branch = `git rev-parse --abbrev-ref HEAD`.strip
unless ["main", "master"].include?(branch)
abort "Version bump must run on main or master. Current: #{branch}."
end

unless system("git diff --quiet") && system("git diff --cached --quiet")
abort "Version bump requires a clean working tree."
end

sh "bundle exec gem bump --version 'next #{level}' --commit --tag --push"
end

desc "Update changelog, commit, and tag"
task :prep do
version = GitMarkdown::VERSION
Expand Down
17 changes: 13 additions & 4 deletions git-markdown.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,22 @@ Gem::Specification.new do |spec|

spec.summary = "Convert GitHub PRs to Markdown for local AI code review"
spec.description = "A CLI tool that fetches GitHub pull requests and converts them to Markdown format, perfect for local AI assistants like opencode and codex."
spec.homepage = "https://github.com/ethos-link/git-markdown"
spec.homepage = "https://www.ethos-link.com/opensource/git-markdown"
spec.license = "MIT"
spec.required_ruby_version = ">= 3.0.0"

spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/CHANGELOG.md"
repo = "https://github.com/ethos-link/git-markdown"
branch = "master"

spec.metadata = {
"homepage_uri" => spec.homepage,
"source_code_uri" => repo,
"bug_tracker_uri" => "#{repo}/issues",
"changelog_uri" => "#{repo}/blob/#{branch}/CHANGELOG.md",
"documentation_uri" => "#{repo}/blob/#{branch}/README.md",
"funding_uri" => "https://www.reviato.com/",
"rubygems_mfa_required" => "true"
}

spec.files = Dir.chdir(File.expand_path(__dir__)) do
`git ls-files -z`.split("\x0").reject do |f|
Expand Down