Commit 42d0eff2 authored by Eric Timmons's avatar Eric Timmons
Browse files

Improve bundling source code

parent fc5343da
......@@ -14,10 +14,33 @@
(in-package #:clpm-cli/deploy)
(deploy:define-resource-directory deploy-src "clpm/")
(deploy:define-resource-directory deploy-cli "cli/")
(deploy:define-resource-directory deploy-features "features/")
(deploy:define-resource-directory deploy-client "client/")
(defun copy-directory-tree-ignoring-fasls-and-.git (source target)
((uiop:directory-pathname-p source)
(let* ((directory-name (car (last (pathname-directory source))))
(new-target (merge-pathnames (make-pathname :directory (list :relative directory-name))
(unless (equal directory-name ".git")
(dolist (new-source (uiop:directory* (merge-pathnames uiop:*wild-file* source)))
(copy-directory-tree-ignoring-fasls-and-.git new-source new-target)))))
((not (equal (pathname-type source) "fasl"))
(ensure-directories-exist target)
(uiop:copy-file source (merge-pathnames (make-pathname :name (pathname-name source)
:type (pathname-type source))
(deploy:define-hook (:deploy deploy-source-code) (system directory)
(when (uiop:featurep :clpm-deploy-source-code)
(dolist (dir '("cli/" "features/" "clpm/" "ext/" "licenses/"
"clpm-cli.asd" "clpm-features.asd" "clpm.asd"))
(merge-pathnames dir (asdf:system-source-directory system))
(merge-pathnames "src/" directory)))))
(deploy:define-hook (:deploy deploy-client) (system directory)
(merge-pathnames "client/" (asdf:system-source-directory system))
;; Don't deploy the WinHttp dll
......@@ -13,6 +13,7 @@
(defparameter *clpm-feature-documentation*
`((:clpm . "Required feature. Denotes that CLPM is present.")
(:clpm-curl . "Build support for using the curl executable to download files.")
(:clpm-deploy-source-code . "Bundle source code in the resource directory when deploying.")
(:clpm-dexador . "Build support for using the Dexador library to download files.")
(:clpm-drakma . "Build support for using the Drakma library to download files.")
(:clpm-firejail . "EXPERIMENTAL: Build support for using firejail to sandbox grovelers.")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment