lib/git-up.rb in git-up-0.5.10 vs lib/git-up.rb in git-up-0.5.11
- old
+ new
@@ -1,8 +1,10 @@
require 'colored'
require 'grit'
+require 'git-up/version'
+
class GitUp
def run(argv)
process_args(argv)
command = ['git', 'fetch', '--multiple']
@@ -36,14 +38,17 @@
master #{"up to date".green}
development #{"rebasing...".yellow}
staging #{"fast-forwarding...".yellow}
production #{"up to date".green}
-There are no command-line options, but there are a few
-`git config` variables you can set. For info on those
-and more, check out the man page:
+ $ git up --version # print version info
+ $ git up --help # print this message
+There are no interesting command-line options, but
+there are a few `git config` variables you can set.
+For info on those and more, check out the man page:
+
$ git up man
Or install it to your system, so you can get to it with
`man git-up` or `git help up`:
@@ -54,9 +59,12 @@
man_path = File.expand_path('../../man/git-up.1', __FILE__)
case argv
when []
return
+ when ["-v"], ["--version"]
+ $stdout.puts "git-up #{GitUp::VERSION}"
+ exit
when ["man"]
system "man", man_path
exit
when ["install-man"]
destination = "/usr/local/share/man"