branch: elpa/pacmacs
commit 59685e56a487ea1f75cc97958beb6216c0f943cc
Author: rexim <[email protected]>
Commit: rexim <[email protected]>

    Clean elc in `tools/compile.el` script. Close #147
---
 .travis.yml      |  1 -
 tools/compile.el | 18 ++++++++++--------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index bd89b63611..eaa0786262 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,7 +16,6 @@ env:
   - EVM_EMACS=emacs-24.5-bin
 script:
   - emacs --script ./tools/compile.el
-  - cask clean-elc
   - cask exec ert-runner
 notifications:
   email:
diff --git a/tools/compile.el b/tools/compile.el
index 62520fa090..66e72e6271 100755
--- a/tools/compile.el
+++ b/tools/compile.el
@@ -6,12 +6,14 @@
   (require 'f)
   (require 'bytecomp)
   (let* ((byte-compile-error-on-warn t)
-         (load-path (cons (cask-path bundle) (cask-load-path bundle))))
-    (when (->> (cask-files bundle)
-               (-filter (-lambda (path)
-                          (and (f-file? path)
-                               (f-ext? path "el"))))
-               (-map (-lambda (file)
-                       (byte-compile-file file nil)))
-               (-any #'null))
+         (load-path (cons (cask-path bundle) (cask-load-path bundle)))
+         (compilation-failed (->> (cask-files bundle)
+                                  (-filter (-lambda (path)
+                                             (and (f-file? path)
+                                                  (f-ext? path "el"))))
+                                  (-map (-lambda (file)
+                                          (byte-compile-file file nil)))
+                                  (-any #'null))))
+    (cask-clean-elc bundle)
+    (when compilation-failed
       (kill-emacs 1))))

Reply via email to