From 21b9de1653b92be7d0e23e5bec854e9dfb2153de Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Sat, 5 Mar 2022 18:47:42 -0600 Subject: added --version --- build-app.lisp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'build-app.lisp') diff --git a/build-app.lisp b/build-app.lisp index b50635f..bb3d312 100644 --- a/build-app.lisp +++ b/build-app.lisp @@ -26,6 +26,9 @@ (in-package :oneliners.cli.app) +;;; VERSION +(defparameter +ol-version+ "0.6.0") + ;;; HELP TEXTS (defparameter +invite-help-text+ " @@ -131,8 +134,10 @@ export EDITOR=/usr/bin/zile (group (:header "HELP OPTIONS") (flag :long-name "whois" :description "View information about a contributor. The first argument is a contributor handle.") - (flag :long-name "help" - :description "Print help for a topic. Topics: wiki, account, invites, variables, editor")) + (flag :long-name "help" + :description "Print help for a topic. Topics: wiki, account, invites, variables, editor") + (flag :long-name "version" + :description "Print the client's version")) (group (:header "Advanced Options" :hidden t) (flag :long-name "clear-cache" :description "Clears all cached search results from your system.")) @@ -202,6 +207,8 @@ than the users." (handler-case (let ((arguments (remainder))) (cond + ((getopt :long-name "version") + (format t "Oneliner CLI Version: ~a~%" +ol-version+)) ((getopt :long-name "help") (if (and arguments (find-group-with-header (first arguments))) (help :item (find-group-with-header (first arguments))) -- cgit v1.2.3