Browse Source

Add value for version, build information...

 - Add program help and summary
 - Value for version and build information are connected to actual system so not very useful
Leo 10 years ago
parent
commit
ac4f80f2c1
2 changed files with 14 additions and 3 deletions
  1. 1 1
      VERSION
  2. 13 2
      src/oclaunch.ml

+ 1 - 1
VERSION

@@ -1 +1 @@
-0.1
+0.1.2

+ 13 - 2
src/oclaunch.ml

@@ -36,13 +36,24 @@
 
 
 open Core.Std;;
 open Core.Std;;
 
 
+(* Variable to store version number *)
+(* TODO Get value from file *)
+let version_number = "0.1.2";;
+
+(* Variable store building information *)
+(* XXX This is fake value, it corresponds to the running
+ * information *)
+let build_info = ( "Build with OCaml version " ^ (Sys.ocaml_version) ^ " on " ^ (Sys.os_type) );;
+
 (* Define commands *)
 (* Define commands *)
 let commands =
 let commands =
   Command.basic
   Command.basic
-    ~summary:"TODO"
+    ~summary:"OcLaunch program is published under CeCILL licence. See https://gitlab.com/WzukW/oclaunch for details"
+    ~readme:(fun () -> "See https://gitlab.com/WzukW/oclaunch for help")
     Command.Spec.empty
     Command.Spec.empty
     Default.run
     Default.run
 ;;
 ;;
 
 
 let () =
 let () =
-  Command.run ~version:"0.1" ~build_info:"TEST" commands
+  Command.run ~version:version_number ~build_info:build_info commands
+;;