Skip to content

Commit

Permalink
Add version to cli help text
Browse files Browse the repository at this point in the history
  • Loading branch information
julienvincent committed Sep 4, 2024
1 parent 5230de4 commit 8e099ba
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/kmono-cli/src/k16/kmono/cli/main.clj
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
(ns k16.kmono.cli.main
(:require
[babashka.process :as proc]
[cli-matic.core :as cli]
[clojure.string :as str]
[k16.kmono.cli.commands.cp :as commands.cp]
[k16.kmono.cli.commands.repl :as commands.repl]
[k16.kmono.cli.commands.exec :as commands.run]
[k16.kmono.cli.commands.repl :as commands.repl]
[k16.kmono.cli.commands.run :as commands.tool])
(:gen-class))

(set! *warn-on-reflection* true)

(defmacro version []
(let [res (proc/sh (str/split "git describe --abbrev=0 --tags" #" "))]
(str/replace (str/trim (:out res)) #"v" "")))

(def cli-configuration
{:command "kmono"
:description "A cli for managing clojure (mono)repos"
:version "0.0.0"
:version (version)
:opts [{:as "Run commands as if in this directory"
:option "dir"
:short "d"
Expand Down

0 comments on commit 8e099ba

Please sign in to comment.