Browse Source

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

Brit Butler 11 years ago
parent
commit
0760459e8f
2 changed files with 7 additions and 2 deletions
  1. 4 0
      src/coleslaw.lisp
  2. 3 2
      src/packages.lisp

+ 4 - 0
src/coleslaw.lisp

1
 (in-package :coleslaw)
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
 (defun main (&optional (repo-dir "") oldrev)
6
 (defun main (&optional (repo-dir "") oldrev)
4
   "Load the user's config file, then compile and deploy the site. Optionally,
7
   "Load the user's config file, then compile and deploy the site. Optionally,
5
 REPO-DIR is the location of the blog repo and OLDREV is the revision prior to
8
 REPO-DIR is the location of the blog repo and OLDREV is the revision prior to
6
 the last push."
9
 the last push."
10
+  (setf *last-revision* oldrev)
7
   (load-config repo-dir)
11
   (load-config repo-dir)
8
   (load-content)
12
   (load-content)
9
   (compile-theme (theme *config*))
13
   (compile-theme (theme *config*))

+ 3 - 2
src/packages.lisp

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