From: Florian Brosch Date: Fri, 25 Feb 2011 01:35:42 +0000 (+0100) Subject: Add --version X-Git-Tag: 0.37.1~3^2~376 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=6f0c6d6e5ad5ebf3e7699c79a21c28e7d06b40a1;p=thirdparty%2Fvala.git Add --version --- diff --git a/src/valadoc/valadoc.vala b/src/valadoc/valadoc.vala index 4be763089..7c07838b5 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) {