From 0760459e8f85e89e04f78f8a5b2518cc9558aeea Mon Sep 17 00:00:00 2001 From: Brit Butler Date: Wed, 7 May 2014 17:51:26 -0400 Subject: [PATCH] Add *last-revision* and export it and GET-UPDATED-FILES. --- src/coleslaw.lisp | 4 ++++ src/packages.lisp | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/coleslaw.lisp b/src/coleslaw.lisp index 5b93533..2bf8c78 100644 --- a/src/coleslaw.lisp +++ b/src/coleslaw.lisp @@ -1,9 +1,13 @@ (in-package :coleslaw) +(defvar *last-revision* nil + "The git revision prior to the last push. For use with GET-UPDATED-FILES.") + (defun main (&optional (repo-dir "") oldrev) "Load the user's config file, then compile and deploy the site. Optionally, REPO-DIR is the location of the blog repo and OLDREV is the revision prior to the last push." + (setf *last-revision* oldrev) (load-config repo-dir) (load-content) (compile-theme (theme *config*)) diff --git a/src/packages.lisp b/src/packages.lisp index 5061e50..af3b745 100644 --- a/src/packages.lisp +++ b/src/packages.lisp @@ -3,20 +3,21 @@ (:use :cl) (:import-from :alexandria #:hash-table-values #:make-keyword - #:mappend - #:compose) + #:mappend) (:import-from :cl-fad #:file-exists-p) (:import-from :closure-template #:compile-template) (:import-from :local-time #:format-rfc1123-timestring) (:export #:main #:preview #:*config* + #:*last-revision* #:content #:post #:index #:render-text #:add-injection #:theme-fn + #:get-updated-files ;; The Document Protocol #:add-document #:find-all