Removed the default deploy method and added RSYNC plugin
This commit is contained in:
parent
82702d25d3
commit
774a29a372
3 changed files with 29 additions and 1 deletions
|
@ -7,6 +7,13 @@
|
|||
* Available plugins are listed below with usage descriptions and
|
||||
config examples.
|
||||
|
||||
## Direct deployment via rsync
|
||||
|
||||
**Description**: This directly sends the contents of the staging dir to the deployed directory.
|
||||
The former default deployment method.
|
||||
|
||||
**Example**: `(rsync "--exclude" ".git/" "--exclude" ".gitignore" "--copy-links")`
|
||||
|
||||
## Analytics via Google
|
||||
|
||||
**Description**: Provides traffic analysis through
|
||||
|
|
19
plugins/rsync.lisp
Normal file
19
plugins/rsync.lisp
Normal file
|
@ -0,0 +1,19 @@
|
|||
|
||||
(defpackage :coleslaw-rsync
|
||||
(:use :cl)
|
||||
(:import-from :coleslaw #:*config*
|
||||
#:deploy
|
||||
#:deploy-dir)
|
||||
(:export #:enable))
|
||||
|
||||
(in-package :coleslaw-rsync)
|
||||
|
||||
(defvar *args* nil)
|
||||
|
||||
(defmethod deploy (staging)
|
||||
(coleslaw::run-program "rsync --delete ~{~A~^ ~} -avz ~A ~A" *args*
|
||||
(merge-pathnames staging)
|
||||
(merge-pathnames (deploy-dir *config*))))
|
||||
|
||||
(defun enable (&rest args)
|
||||
(setf *args* args))
|
|
@ -46,7 +46,9 @@
|
|||
(defgeneric deploy (staging)
|
||||
(:documentation "Deploy the STAGING build to the directory specified in the config.")
|
||||
(:method (staging)
|
||||
(run-program "rsync --delete -avz ~a ~a" staging (merge-pathnames (deploy-dir *config*)))))
|
||||
"By default, do nothing"
|
||||
(declare)))
|
||||
|
||||
|
||||
(defun update-symlink (path target)
|
||||
"Update the symlink at PATH to point to TARGET."
|
||||
|
|
Loading…
Add table
Reference in a new issue