Skip to content

Commit e1e1768

Browse files
committed
feat: Add dev flag
1 parent 6eefb8e commit e1e1768

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

lisp/_prepare.lisp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,10 @@ the `qob-start' execution.")
292292
"Non-nil when flag is on (`-a', `--all')."
293293
(qob--flag "--all"))
294294

295+
(defun qob-dev-p ()
296+
"Non-nil when flag is on (`--dev')."
297+
(qob--flag "--dev"))
298+
295299
(defun qob-no-color-p ()
296300
"Non-nil when flag is on (`--no-color')."
297301
(qob--flag "--no-color"))

lisp/core/install-deps.lisp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,25 @@
5151

5252
(defun qob-install-deps--by-system-name (name)
5353
"Install dependencies by system's NAME."
54-
(let* ((system (asdf:find-system name))
55-
(deps (asdf:system-depends-on system)))
56-
(qob-install-systems deps)))
54+
(when name
55+
(let* ((system (asdf:find-system name))
56+
(deps (asdf:system-depends-on system)))
57+
(qob-install-systems deps))))
5758

5859
(qob-start
5960
(let ((systems (qob-args))
60-
(primary-system (qob-primary-system-entry)))
61+
(primary-system (qob-primary-system-entry))
62+
(primary-test-system (qob-primary-test-system-entry)))
6163
(cond
6264
;; If specified system(s).
6365
(systems
6466
(dolist (system-name systems)
6567
(qob-install-deps--by-system-name system-name)))
6668
;; Print primary system.
6769
(primary-system
68-
(qob-install-deps--by-system-name (car primary-system)))
70+
(qob-install-deps--by-system-name (car primary-system))
71+
(when (qob-dev-p)
72+
(qob-install-deps--by-system-name (car primary-test-system))))
6973
;; Print help.
7074
(t
7175
(qob-help "core/install-deps")))))

src/utils.lisp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@
7272
(nconc opts `("--global")))
7373
(when (clingon:getopt cmd :all)
7474
(nconc opts `("--all")))
75+
(when (clingon:getopt cmd :dev)
76+
(nconc opts `("--dev")))
7577
(when (clingon:getopt cmd :no-color)
7678
(nconc opts `("--no-color")))
7779
(when (clingon:getopt cmd :compression)

test/commands/local/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ qob dists
3838
qob list
3939

4040
# Preparation
41-
qob install-deps
41+
qob install-deps --dev
4242
qob package
4343

4444
# Development

0 commit comments

Comments
 (0)