diff --git a/.rubocop.yml b/.rubocop.yml index d9eac99..87f73fc 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -14,3 +14,7 @@ Metrics/ClassLength: # Configuration parameters: CountComments. Metrics/MethodLength: Enabled: false + +Style/FileName: + Exclude: + - 'bin/git-generate-changelog' diff --git a/bin/git-generate-changelog b/bin/git-generate-changelog new file mode 100755 index 0000000..5d0d48a --- /dev/null +++ b/bin/git-generate-changelog @@ -0,0 +1,4 @@ +#! /usr/bin/env ruby + +require_relative "../lib/github_changelog_generator" +GitHubChangelogGenerator::ChangelogGenerator.new.run diff --git a/ext/mkrf_conf.rb b/ext/mkrf_conf.rb new file mode 100644 index 0000000..60e36a3 --- /dev/null +++ b/ext/mkrf_conf.rb @@ -0,0 +1,10 @@ +PREFIX = "/usr/local" +MANPREFIX = "#{PREFIX}/share/man/man1" +MAN_PAGES = "man/git-*" + +require "fileutils" + +Dir.glob(MAN_PAGES).each do |f| + filename = File.basename(f) + FileUtils.cp(f, "#{MANPREFIX}/#{filename}") +end diff --git a/github_changelog_generator.gemspec b/github_changelog_generator.gemspec index fd6249d..f4b44cf 100644 --- a/github_changelog_generator.gemspec +++ b/github_changelog_generator.gemspec @@ -16,7 +16,8 @@ Gem::Specification.new do |spec| spec.summary = "Script, that automatically generate changelog from your tags, issues, labels and pull requests." spec.description = "Changelog generation has never been so easy. Fully automate changelog generation - this gem generate change log file based on tags, issues and merged pull requests from Github issue tracker." spec.homepage = "https://github.com/skywinder/Github-Changelog-Generator" - spec.license = "MIT" + spec.license = "MIT" + spec.extensions = "ext/mkrf_conf.rb" spec.files = `git ls-files -z`.split("\x0") spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } diff --git a/man/git-generate-changelog.1 b/man/git-generate-changelog.1 new file mode 100644 index 0000000..bdf7897 --- /dev/null +++ b/man/git-generate-changelog.1 @@ -0,0 +1,27 @@ +.\" Manpage for git-activity +.TH man 1 "Sep 2015" "1.0" "git genrate-changelog man page" +.SH NAME +git activity \- Generate changelog from github +.SH SYNOPSIS +git generate-changelog [-h|--help] [-u|--user] [-p|--project] +.SH DESCRIPTION +Automatically generate change log from your tags, issues, labels and pull requests on GitHub. +.SH OPTIONS +.TP +.I --h +Show helper provide from gem. +.TP +.I --help +Thos this man page. +.TP +.I -u | --user github_username +Username of the owner of target GitHub repo +.TP +.I -p | --project github_project +Name of project on GitHub Just convenience options to specify user/project: +.SH SEE ALSO +git-for-each-ref(1) +.SH BUGS +No known bugs. +.SH AUTHOR +Petr Korolev