소스 검색

Add *last-revision* and export it and GET-UPDATED-FILES.

Brit Butler 11 년 전
부모
커밋
0760459e8f
2개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 0
      src/coleslaw.lisp
  2. 3 2
      src/packages.lisp

+ 4 - 0
src/coleslaw.lisp

@@ -1,9 +1,13 @@
1 1
 (in-package :coleslaw)
2 2
 
3
+(defvar *last-revision* nil
4
+  "The git revision prior to the last push. For use with GET-UPDATED-FILES.")
5
+
3 6
 (defun main (&optional (repo-dir "") oldrev)
4 7
   "Load the user's config file, then compile and deploy the site. Optionally,
5 8
 REPO-DIR is the location of the blog repo and OLDREV is the revision prior to
6 9
 the last push."
10
+  (setf *last-revision* oldrev)
7 11
   (load-config repo-dir)
8 12
   (load-content)
9 13
   (compile-theme (theme *config*))

+ 3 - 2
src/packages.lisp

@@ -3,20 +3,21 @@
3 3
   (:use :cl)
4 4
   (:import-from :alexandria #:hash-table-values
5 5
                             #:make-keyword
6
-                            #:mappend
7
-                            #:compose)
6
+                            #:mappend)
8 7
   (:import-from :cl-fad #:file-exists-p)
9 8
   (:import-from :closure-template #:compile-template)
10 9
   (:import-from :local-time #:format-rfc1123-timestring)
11 10
   (:export #:main
12 11
            #:preview
13 12
            #:*config*
13
+           #:*last-revision*
14 14
            #:content
15 15
            #:post
16 16
            #:index
17 17
            #:render-text
18 18
            #:add-injection
19 19
            #:theme-fn
20
+           #:get-updated-files
20 21
            ;; The Document Protocol
21 22
            #:add-document
22 23
            #:find-all