- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
feat: clean all
Showing
12 changed files
with
107 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
;;;; cmds/clean/all.lisp --- Do all cleaning tasks | ||
|
||
;;; Commentary | ||
;; | ||
;; The `clean all' command definition. | ||
;; | ||
|
||
;;; Code | ||
|
||
(defpackage qob-cli/clean/all | ||
(:use cl) | ||
(:export command)) | ||
|
||
(in-package :qob-cli/clean/all) | ||
|
||
(defun options () | ||
"Options for `clean all' command." | ||
(list )) | ||
|
||
(defun handler (cmd) | ||
"Handler for `clean all' command." | ||
(qob-cli:call-script "clean/all" cmd)) | ||
|
||
(defun command () | ||
"The `clean all' command." | ||
(clingon:make-command | ||
:name "all" | ||
:description "Do all cleaning tasks" | ||
:options (options) | ||
:handler #'handler)) | ||
|
||
;;; End of cmds/clean/all.lisp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
;;;; lisp/clean/all.lisp --- Do all cleaning tasks | ||
|
||
;;; Commentary | ||
;; | ||
;; Command use to do all cleaning tasks | ||
;; | ||
;; $ qob clean all | ||
;; | ||
|
||
;;; Code | ||
|
||
(defconstant qob-clean-all--tasks-total 2 | ||
"Count cleaning task.") | ||
|
||
(defvar qob-clean-all--tasks-count 0 | ||
"Count cleaning task.") | ||
|
||
(defvar qob-clean-all--tasks-cleaned 0 | ||
"Total cleaned tasks.") | ||
|
||
(defmacro qob--clean-section (title &rest body) | ||
"Print clean up TITLE and execute BODY." | ||
`(let (qob-no-cleaning-operation-p) | ||
(incf qob-clean-all--tasks-count) | ||
(qob-with-progress | ||
(concatenate 'string | ||
(qob-format " - [~A/~a] " qob-clean-all--tasks-count qob-clean-all--tasks-total) | ||
(qob-format "~A... " ,title)) | ||
(qob-with-verbosity 'debug ,@body) | ||
(if qob-no-cleaning-operation-p | ||
"skipped ✗" | ||
(progn | ||
(incf qob-clean-all--tasks-cleaned) | ||
"done ✓"))))) | ||
|
||
(qob-start | ||
(qob-msg "Applying ~A cleaning tasks..." qob-clean-all--tasks-total) | ||
(qob-msg "") | ||
(qob--clean-section (qob-format "Cleaning ~A" (qob-ansi-green "workspace")) | ||
(qob-call "clean/workspace")) | ||
(qob--clean-section (qob-format "Cleaning ~A" (qob-ansi-green "dist")) | ||
(qob-call "clean/dist")) | ||
(qob-msg "") | ||
(qob-info "(Total of ~A task~A cleaned, ~A skipped)" | ||
qob-clean-all--tasks-cleaned | ||
(qob--sinr qob-clean-all--tasks-cleaned "" "s") | ||
(- qob-clean-all--tasks-count qob-clean-all--tasks-cleaned))) | ||
|
||
;;; End of lisp/clean/all.lisp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters