From: Brian Warner Date: Mon, 16 Jul 2007 21:58:36 +0000 (-0700) Subject: runner.py: make 'allmydata-tahoe --version' emit version numbers of everything X-Git-Url: https://git.rkrishnan.org/(%5B%5E?a=commitdiff_plain;h=9be3da03f634d2a3ad215a6f2e1834ed8fb32e4c;p=tahoe-lafs%2Ftahoe-lafs.git runner.py: make 'allmydata-tahoe --version' emit version numbers of everything --- diff --git a/src/allmydata/scripts/runner.py b/src/allmydata/scripts/runner.py index eacff4fc..1b6af812 100644 --- a/src/allmydata/scripts/runner.py +++ b/src/allmydata/scripts/runner.py @@ -9,7 +9,8 @@ class Options(usage.Options): synopsis = "Usage: allmydata [command options]" optFlags = [ - ["quiet", "q", "operate silently"], + ["quiet", "q", "Operate silently."], + ["version", "V", "Display version numbers and exit."], ] subCommands = [] @@ -18,6 +19,15 @@ class Options(usage.Options): subCommands += debug.subCommands subCommands += cli.subCommands + def opt_version(self): + from twisted import copyright + import allmydata, zfec, foolscap + print "Twisted version:", copyright.version + print "Foolscap version:", foolscap.__version__ + print "zfec version:", zfec.__version__ + print "allmydata version:", allmydata.__version__ + sys.exit(0) + def postOptions(self): if not hasattr(self, 'subOptions'): raise usage.UsageError("must specify a command")