Don't pass pathnames to RUN-PROGRAM.

This commit is contained in:
Brit Butler 2012-08-19 00:42:40 -04:00
parent d2aad78fb9
commit 336763644d

View file

@ -32,12 +32,14 @@
(defun deploy (dir)
"Deploy DIR, updating the .prev and .curr symlinks."
(let ((new-build (app-path (format nil "generated/~a" (get-universal-time)))))
(run-program "mv" (list dir (app-path new-build)))
(let ((new-build (namestring (app-path (format nil "generated/~a"
(get-universal-time))))))
(run-program "mv" (list dir new-build))
(when (probe-file (app-path ".prev"))
(delete-files (read-symlink (app-path ".prev")) :recursive t))
(when (probe-file (app-path ".curr"))
(run-program "ln" (list "-sfn" (read-symlink (app-path ".curr")) ".prev")))
(let ((curr-build (namestring (read-symlink (app-path ".curr")))))
(run-program "ln" (list "-sfn" curr-build ".prev"))))
(run-program "ln" (list "-sfn" new-build ".curr")))
(setf (last-published) (last-commit)))