[minor api change] coleslaw:main takes keywords, can now skip the deploy

This commit is contained in:
Masataro Asai 2019-10-27 13:41:57 -04:00
parent 5f32be57f7
commit 38a6c2d475

View file

@ -3,16 +3,19 @@
(defvar *last-revision* nil (defvar *last-revision* nil
"The git revision prior to the last push. For use with GET-UPDATED-FILES.") "The git revision prior to the last push. For use with GET-UPDATED-FILES.")
(defun main (repo-dir &optional oldrev) (defun main (repo-dir &key oldrev (deploy t))
"Load the user's config file, then compile and deploy the blog stored "Load the user's config file, compile the blog in REPO-DIR into STAGING-DIR,
in REPO-DIR. Optionally, OLDREV is the revision prior to the last push." and optionally deploy the blog to DEPLOY-DIR.
OLDREV -- the git revision prior to the last push.
DEPLOY -- when non-nil, perform the deploy. (default: t)"
(load-config repo-dir) (load-config repo-dir)
(setf *last-revision* oldrev) (setf *last-revision* oldrev)
(load-content) (load-content)
(compile-theme (theme *config*)) (compile-theme (theme *config*))
(let ((dir (staging-dir *config*))) (let ((dir (staging-dir *config*)))
(compile-blog dir) (compile-blog dir)
(deploy dir))) (when deploy
(deploy dir))))
(defun load-content () (defun load-content ()
"Load all content stored in the blog's repo." "Load all content stored in the blog's repo."