snapshot management: add "current" link
This commit is contained in:
parent
4767c58ac3
commit
888ec4dae8
|
@ -26,6 +26,12 @@
|
||||||
|
|
||||||
(define snapshots-dir (build-path site-dir 'up))
|
(define snapshots-dir (build-path site-dir 'up))
|
||||||
|
|
||||||
|
(define link-file (build-path snapshots-dir "current"))
|
||||||
|
|
||||||
|
(when (link-exists? link-file)
|
||||||
|
(printf "Removing old \"current\" link\n")
|
||||||
|
(delete-file link-file))
|
||||||
|
|
||||||
(define snapshots (for/list ([p (in-list (directory-list snapshots-dir))]
|
(define snapshots (for/list ([p (in-list (directory-list snapshots-dir))]
|
||||||
#:when (directory-exists? (build-path snapshots-dir p)))
|
#:when (directory-exists? (build-path snapshots-dir p)))
|
||||||
(path-element->string p)))
|
(path-element->string p)))
|
||||||
|
@ -50,3 +56,6 @@
|
||||||
(a ((href ,(string-append current-snapshot
|
(a ((href ,(string-append current-snapshot
|
||||||
"/index.html")))
|
"/index.html")))
|
||||||
,current-snapshot))))
|
,current-snapshot))))
|
||||||
|
|
||||||
|
(printf "Creating \"current\" link\n")
|
||||||
|
(make-file-or-directory-link current-snapshot link-file)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user