Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

decouple from example app so can actually serve as buildpack, change …

…detect method
  • Loading branch information...
commit b69f2dfbb9e17728c6b445c9da9bb616939d1a0f 1 parent 3e3fc1a
@mtravers mtravers authored
Showing with 10 additions and 20 deletions.
  1. +4 −5 README.md
  2. +2 −2 bin/detect
  3. +4 −13 setup/compile.lisp
View
9 README.md
@@ -5,17 +5,16 @@ Attempt at a buildpack for Common Lisp (using OpenMCL). Work in progress.
TODO
- fucking git line ending problems PKM!
-- ccl hack why cycle?
-- crashes:
-2012-02-23T03:22:25+00:00 heroku[web.1]: Process exited with status 0
-2012-02-23T03:22:25+00:00 heroku[web.1]: State changed from starting to crashed
-- lots of random compile errors
+- detect is wrong
+- need to define app structure (distinct from buildpack)
+
TESTING locally
Compile:
rm -rf /tmp/build
git clone -l . /tmp/build
+rm -rf /tmp/cache
mkdir /tmp/cache
ln -s /misc/repos/ccl /tmp/cache/ccl
cd /tmp/build
View
4 bin/detect
@@ -1,7 +1,7 @@
#!/bin/sh
-# this pack is valid for apps with a setup/compile.lisp in the root
-if [ -f $1/setup/compile.lisp ]; then
+# this pack is valid for apps with a heroku-setup.lisp in the root
+if [ -f $1/heroku-setup.lisp ]; then
echo "CLFramework"
exit 0
else
View
17 setup/compile.lisp
@@ -1,11 +1,5 @@
(in-package :cl-user)
-;;; Customize
-
-(defvar *app-name* "example")
-
-;;; Standard
-
(defvar *app-dir* (butlast (pathname-directory *load-pathname*)))
(defvar *cache-dir* (pathname-directory (pathname (concatenate 'string (getenv "CACHE_DIR") "/"))))
@@ -18,8 +12,6 @@
(funcall (symbol-function (find-symbol "INSTALL" (find-package "QUICKLISP-QUICKSTART")))
:path (make-pathname :directory (pathname-directory ql-setup))))))
-;(load (make-pathname :defaults *load-pathname* :name "setup"))
-
(asdf:clear-system "acl-compat")
(load (make-pathname :directory (append *cache-dir* '("repos" "portableaserve" "acl-compat"))
@@ -27,11 +19,7 @@
(load (make-pathname :directory (append *cache-dir* '("repos" "portableaserve" "aserve"))
:defaults "aserve.asd"))
-(load (make-pathname :directory *app-dir* :name *app-name* :type "asd"))
-
-(ql:quickload *app-name*)
-
-;;; +++ Belongs elsewhere, also needs to be extensible...
+;;; Default toplevel, app can redefine if necessary
(defun heroku-toplevel ()
(let ((port (parse-integer (getenv "PORT"))))
(format t "Listening on port ~A~%" port)
@@ -39,6 +27,9 @@
(loop (sleep 60)) ;sleep forever
))
+;;; This loads the application
+(load (make-pathname :directory *app-dir* :defaults "heroku-setup.lisp"))
+
(save-application
(format nil "~A/bin/lispapp" (getenv "BUILD_DIR")) ;must match path specified in bin/release
:prepend-kernel t
Please sign in to comment.
Something went wrong with that request. Please try again.