summaryrefslogtreecommitdiff
path: root/DEPLOY.org
diff options
context:
space:
mode:
authorGrant Shoshin Shangreaux <shoshin@cicadas.surf>2022-12-07 20:27:08 -0600
committerGrant Shoshin Shangreaux <shoshin@cicadas.surf>2022-12-07 20:27:08 -0600
commitc78b0ac9a5eb89c271527ea0b8aec9f95c859427 (patch)
tree3b3ff42dd7d463ab6877399080bb8f8104564251 /DEPLOY.org
parent9983bad80881f72db54017115c3c70ea676d59b4 (diff)
Add: first draft of DEPLOY.org program
Diffstat (limited to 'DEPLOY.org')
-rw-r--r--DEPLOY.org39
1 files changed, 39 insertions, 0 deletions
diff --git a/DEPLOY.org b/DEPLOY.org
new file mode 100644
index 0000000..5558813
--- /dev/null
+++ b/DEPLOY.org
@@ -0,0 +1,39 @@
+* Build New Lisp Application Image
+
+#+name: build-image
+#+begin_src emacs-lisp :results none :var image-name=vampire-image-name()
+ (with-current-buffer (get-buffer-create "*vampire-build*")
+ (erase-buffer)
+ (insert (format "Building image %s.\n\n" image-name))
+ (shell-command "sbcl --load build.lisp" (current-buffer))
+ (rename-file "bin/vampire" image-name))
+ (switch-to-buffer-other-window "*vampire-build*")
+#+end_src
+
+** New tagged image filename
+
+#+name: vampire-image-name
+#+begin_src emacs-lisp
+ (let ((commit (string-trim (shell-command-to-string "git rev-parse --short HEAD")))
+ (date (string-trim (shell-command-to-string "date '+%Y%m%d'"))))
+ (format "bin/vampire-%s-%s" commit date))
+#+end_src
+
+* Copy Image To Host Destination
+
+#+begin_src emacs-lisp :var name=vampire-image-name() dest="/scp:vampire@:" :results none
+ (copy-file name (concat dest name)))
+#+end_src
+
+* Copy CSS files
+
+#+begin_src emacs-lisp :var dest="/scp:vampire@:static/css/" :results none
+ (copy-directory "static/css/" dest nil nil t)
+#+end_src
+
+** copy directory notes
+
+If NEWNAME is a directory name, copy DIRECTORY as a subdirectory
+there. However, if called from Lisp with a non-nil optional
+argument COPY-CONTENTS, copy the contents of DIRECTORY directly
+into NEWNAME instead.