Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
* Support JSON format with Eask-file linter (#85)
* Handle multiple Eask-files for `init` command (#86)
* Remove dependency `s.el` (962dd5f8d0da1443368ac2d79b0a013c153a804e)
* Acknowledge cleaning state for `clean all` command (#87)

## 0.7.x
> Released Sep 08, 2022
Expand Down
30 changes: 18 additions & 12 deletions lisp/clean/all.el
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,26 @@
(file-name-directory (nth 1 (member "-scriptload" command-line-args))))
nil t)

(defvar eask-no-cleaning-operation-p nil
"Set to non-nil if there is no cleaning operation done.")

(eask-start
(eask-with-progress
"✓ Cleaning workspace...\n"
(eask-call "clean/workspace")
"done")
(let (eask-no-cleaning-operation-p)
(eask-with-progress
"Cleaning workspace... \n"
(eask-call "clean/workspace")
(if eask-no-cleaning-operation-p "skipped ✗" "done ✓")))
(eask-msg "")
(eask-with-progress
"✓ Cleaning byte-compile files...\n"
(eask-call "clean/elc")
"done")
(let (eask-no-cleaning-operation-p)
(eask-with-progress
"Cleaning byte-compile files... \n"
(eask-call "clean/elc")
(if eask-no-cleaning-operation-p "skipped ✗" "done ✓")))
(eask-msg "")
(eask-with-progress
"✓ Cleaning dist...\n"
(eask-call "clean/dist")
"done"))
(let (eask-no-cleaning-operation-p)
(eask-with-progress
"Cleaning dist... \n"
(eask-call "clean/dist")
(if eask-no-cleaning-operation-p "skipped ✗" "done ✓"))))

;;; clean/all.el ends here
3 changes: 2 additions & 1 deletion lisp/clean/dist.el
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
(eask-dist-path (expand-file-name eask-dist-path)))
(if (file-directory-p eask-dist-path)
(eask--clean-dist eask-dist-path)
(eask-info "(No dist folder needs to be cleaned)" eask-dist-path))))
(eask-info "(No dist folder needs to be cleaned)" eask-dist-path)
(setq eask-no-cleaning-operation-p t))))

;;; clean/dist.el ends here
3 changes: 2 additions & 1 deletion lisp/clean/elc.el
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
(eask-msg "")
(eask-info "✓ (Total of %s .elc file%s deleted)" (length files)
(eask--sinr files "" "s")))
(eask-info "(No .elc file found in workspace)")))
(eask-info "(No .elc file found in workspace)")
(setq eask-no-cleaning-operation-p t)))

;;; clean/elc.el ends here
11 changes: 7 additions & 4 deletions lisp/clean/workspace.el
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@
nil t)

(eask-start
(let ((target-dir
(if (eask-global-p) user-emacs-directory
(file-name-directory (directory-file-name user-emacs-directory)))))
(let ((target-dir (if (eask-global-p) user-emacs-directory
(file-name-directory (directory-file-name user-emacs-directory)))))
(unless eask--first-init-p
(eask-msg "Deleting %s..." target-dir))
(ignore-errors (delete-directory target-dir t))
(if eask--first-init-p
(eask-info "(Workspace is already cleaned)")
(progn
(eask-info "(Workspace is already cleaned)")
(setq eask-no-cleaning-operation-p t))
(eask-info "✓ (Workspace is now cleaned)" target-dir))))

;;; clean/workspace.el ends here