Skip to content

Commit

Permalink
- Add new 'version' info
Browse files Browse the repository at this point in the history
- Make 'fpm --help' report the version as well as some other useful
  info (fixes jordansissel#281)
  • Loading branch information
jordansissel committed Nov 27, 2012
1 parent c13edbc commit b09a681
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fpm.gemspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require File.join(File.dirname(__FILE__), "lib/fpm/version")
Gem::Specification.new do |spec|
files = []
dirs = %w{lib bin templates}
Expand All @@ -10,7 +11,7 @@ Gem::Specification.new do |spec|
files << "CHANGELIST"

spec.name = "fpm"
spec.version = "0.4.22"
spec.version = FPM::VERSION
spec.summary = "fpm - package building and mangling"
spec.description = "Convert directories, rpms, python eggs, rubygems, and " \
"more to rpms, debs, solaris packages and more. Win at package " \
Expand Down
19 changes: 19 additions & 0 deletions lib/fpm/command.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require "rubygems"
require "fpm/namespace"
require "fpm/version"
require "fpm/util"
require "clamp"
require "ostruct"
Expand All @@ -21,6 +22,24 @@
class FPM::Command < Clamp::Command
include FPM::Util

def help(*args)
return [
"Intro:",
"",
" This is fpm version #{FPM::VERSION}",
"",
" If you think something is wrong, it's probably a bug! :)",
" Please file these here: https://github.com/jordansissel/fpm/issues",
"",
" You can find support on irc (#fpm on freenode irc) or via email with",
" fpm-users@googlegroups.com",
"",

# Lastly, include the default help output via Clamp.
super
].join("\n")
end # def help

option "-t", "OUTPUT_TYPE",
"the type of package you want to create (deb, rpm, solaris, etc)",
:attribute_name => :output_type
Expand Down
3 changes: 3 additions & 0 deletions lib/fpm/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module FPM
VERSION = "0.4.23"
end

0 comments on commit b09a681

Please sign in to comment.