]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Add --version
authorFlorian Brosch <flo.brosch@gmail.com>
Fri, 25 Feb 2011 01:35:42 +0000 (02:35 +0100)
committerFlorian Brosch <flo.brosch@gmail.com>
Fri, 25 Feb 2011 01:35:42 +0000 (02:35 +0100)
src/valadoc/valadoc.vala

index 4be7630890760578e56cc7a135f5949b6a51df44..7c07838b5a86ebb37c09908559693fc3fdbc96bc 100755 (executable)
@@ -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) {