Skip to content

Commit

Permalink
Revert "feat(clean): Improve messages while task cleaning all (#165)"
Browse files Browse the repository at this point in the history
This reverts commit 7eb4a0f.
  • Loading branch information
jcs090218 authored Mar 15, 2023
1 parent 7eb4a0f commit 78148d6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
* Allow few commands' execution without any Eask-file (#159)
* Add command `cat` (#160)
* Improve messages while processing package transaction (#164)
* Improve messages while task cleaning all (#165)

## 0.8.x
> Released Mar 08, 2023
Expand Down
32 changes: 16 additions & 16 deletions lisp/clean/all.el
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
(defvar eask-no-cleaning-operation-p nil
"Set to non-nil if there is no cleaning operation done.")

(defvar eask--clean-tasks-count 0
"Count cleaning task.")
(defvar eask--clean-tasks-total 0
"Total clean tasks.")

(defvar eask--clean-tasks-cleaned 0
"Total cleaned tasks")
Expand All @@ -27,33 +27,33 @@
"Print clean up TITLE and execute BODY."
(declare (indent 1))
`(let (eask-no-cleaning-operation-p)
(cl-incf eask--clean-tasks-count)
(eask-with-progress
(concat " - [" (eask-2str eask--clean-tasks-count) "/6] "
(format "%s... " ,title))
(format "%s... " ,title)
(eask-with-verbosity 'debug ,@body)
(if eask-no-cleaning-operation-p
"skipped ✗"
(cl-incf eask--clean-tasks-cleaned)
"done ✓"))))
(progn
(cl-incf eask--clean-tasks-total)
(if eask-no-cleaning-operation-p
"skipped ✗"
(cl-incf eask--clean-tasks-cleaned)
"done ✓")))))

(eask-start
(eask--clean-section (format "Cleaning %s" (ansi-green "workspace"))
(eask--clean-section "Cleaning workspace"
(eask-call "clean/workspace"))
(eask--clean-section (format "Cleaning %s files" (ansi-green "byte-compile (.elc)"))
(eask--clean-section "Cleaning byte-compile files"
(eask-call "clean/elc"))
(eask--clean-section (format "Cleaning %s" (ansi-green "dist"))
(eask--clean-section "Cleaning dist"
(eask-call "clean/dist"))
(eask--clean-section (format "Cleaning %s file" (ansi-green "autoloads"))
(eask--clean-section "Cleaning autoloads file"
(eask-call "clean/autoloads"))
(eask--clean-section (format "Cleaning %s" (ansi-green "pkg-file"))
(eask--clean-section "Cleaning pkg-file"
(eask-call "clean/pkg-file"))
(eask--clean-section (format "Cleaning %s files" (ansi-green "log"))
(eask--clean-section "Cleaning log files"
(eask-call "clean/log-file"))
(eask-msg "")
(eask-info "(Total of %s task%s cleaned, %s skipped)"
eask--clean-tasks-cleaned
(eask--sinr eask--clean-tasks-cleaned "" "s")
(- eask--clean-tasks-count eask--clean-tasks-cleaned)))
(- eask--clean-tasks-total eask--clean-tasks-cleaned)))

;;; clean/all.el ends here

0 comments on commit 78148d6

Please sign in to comment.