[valadoc] Add --version



commit 6f0c6d6e5ad5ebf3e7699c79a21c28e7d06b40a1
Author: Florian Brosch <flo brosch gmail com>
Date:   Fri Feb 25 02:35:42 2011 +0100

    Add --version

 src/valadoc/valadoc.vala |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/valadoc/valadoc.vala b/src/valadoc/valadoc.vala
index 4be7630..7c07838 100755
--- a/src/valadoc/valadoc.vala
+++ b/src/valadoc/valadoc.vala
@@ -77,6 +77,7 @@ public class ValaDoc : Object {
 		{ "vapidir", 0, 0, OptionArg.FILENAME_ARRAY, ref vapi_directories, "Look for package bindings in DIRECTORY", "DIRECTORY..." },
 		{ "importdir", 0, 0, OptionArg.FILENAME_ARRAY, ref import_directories, "Look for external documentation in DIRECTORY", "DIRECTORY..." },
 		{ "profile", 0, 0, OptionArg.STRING, ref profile, "Use the given profile instead of the default", "PROFILE" },
+		{ "version", 0, 0, OptionArg.NONE, ref version, "Display version number", null },
 
 		{ "pkg", 0, 0, OptionArg.STRING_ARRAY, ref packages, "Include binding for PACKAGE", "PACKAGE..." },
 		{ "import", 0, 0, OptionArg.STRING_ARRAY, ref import_packages, "Include binding for PACKAGE", "PACKAGE..." },
@@ -240,8 +241,8 @@ public class ValaDoc : Object {
 		}
 
 		if (version) {
-			stdout.printf ("Valadoc %s\n", "0.1");
-			return quit (reporter);
+			stdout.printf ("Valadoc %s\n", Config.version);
+			return 0;
 		}
 
 		if (directory == null) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]