mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
feat(cli): doom upgrade: add -B option
To mirror doom sync's -B option.
This commit is contained in:
@ -21,6 +21,7 @@
|
|||||||
(defcli! ((upgrade up))
|
(defcli! ((upgrade up))
|
||||||
((packages? ("-p" "--packages") "Only upgrade packages, not Doom")
|
((packages? ("-p" "--packages") "Only upgrade packages, not Doom")
|
||||||
(jobs ("-j" "--jobs" num) "How many CPUs to use for native compilation")
|
(jobs ("-j" "--jobs" num) "How many CPUs to use for native compilation")
|
||||||
|
(nobuild? ("-B") "Don't rebuild packages when hostname or Emacs version has changed")
|
||||||
&context context)
|
&context context)
|
||||||
"Updates Doom and packages.
|
"Updates Doom and packages.
|
||||||
|
|
||||||
@ -32,7 +33,9 @@ following shell commands:
|
|||||||
doom clean
|
doom clean
|
||||||
doom sync -u"
|
doom sync -u"
|
||||||
(let* ((force? (doom-cli-context-suppress-prompts-p context))
|
(let* ((force? (doom-cli-context-suppress-prompts-p context))
|
||||||
(sync-cmd (append '("sync" "-u") (if jobs `("-j" ,num)))))
|
(sync-cmd (append '("sync" "-u")
|
||||||
|
(if nobuild? '("-B"))
|
||||||
|
(if jobs `("-j" ,num)))))
|
||||||
(cond
|
(cond
|
||||||
(packages?
|
(packages?
|
||||||
;; HACK It's messy to use straight to upgrade straight, due to the
|
;; HACK It's messy to use straight to upgrade straight, due to the
|
||||||
@ -55,6 +58,7 @@ following shell commands:
|
|||||||
(print! (item "Reloading Doom Emacs"))
|
(print! (item "Reloading Doom Emacs"))
|
||||||
(doom-cli-context-put context 'upgrading t)
|
(doom-cli-context-put context 'upgrading t)
|
||||||
(exit! "doom" "upgrade" "-p"
|
(exit! "doom" "upgrade" "-p"
|
||||||
|
(if nobuild? "-B")
|
||||||
(if force? "--force")
|
(if force? "--force")
|
||||||
(if jobs (format "--jobs=%d" jobs))))
|
(if jobs (format "--jobs=%d" jobs))))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user