Skip to content

Commit f3ad398

Browse files
committed
add option to display version
1 parent bdca3b8 commit f3ad398

3 files changed

Lines changed: 13 additions & 8 deletions

File tree

src/practitest_firecracker/cli.clj

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,13 @@
111111
{:exit-message (error-msg errors)}
112112

113113
(= "display-config" (first arguments))
114-
(cond
115-
:else
116-
{:action "display-config" :options options})
114+
{:action "display-config" :options options}
117115

118116
(= "display-options" (first arguments))
119-
(cond
120-
:else
121-
{:action "display-options" :options options})
117+
{:action "display-options" :options options}
122118

119+
(= "version")
120+
{:action "version" :options options}
123121
;; (= "create-testset" (first arguments))
124122
;; (cond
125123
;; (nil? (:project-id options))

src/practitest_firecracker/core.clj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
group-tests
99
create-or-update-tests
1010
create-instances
11-
create-runs]]
11+
create-runs
12+
fc-version]]
1213
[practitest-firecracker.parser.core :refer [send-directory parse-files]]
1314
[practitest-firecracker.utils :refer [exit]]
1415
[clojure.pprint :as pprint]
@@ -45,6 +46,10 @@
4546
(pprint/pprint {"=============== options: ===============" options})
4647
(pprint/pprint {"=============== args: ===============" args}))
4748

49+
"version"
50+
(do
51+
(println "Version: " fc-version))
52+
4853
;; "create-testset"
4954
;; (do
5055
;; (doall

src/practitest_firecracker/utils.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
(ns practitest-firecracker.utils
22
(:require
33
[clj-time.core :as t]
4-
[clojure.pprint :as pprint]))
4+
[clojure.pprint :as pprint]
5+
[clojure.string :as string]
6+
[cheshire.core :as json]))
57

68
(defn print-run-time [text start-time]
79
(let [sec-pass (t/in-seconds (t/interval start-time (t/now)))

0 commit comments

Comments
 (0)