Skip to content

Commit

Permalink
Ensure we work with Radiance 2.0 by customising radiance:environment-…
Browse files Browse the repository at this point in the history
…directory instead.

See Shirakumo/radiance#31
  • Loading branch information
Shinmera committed Aug 13, 2018
1 parent c73c85d commit 02975fa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ If you want to generate the full bootstrap file yourself, you can do so like thi
```commonlisp
(asdf:operate 'asdf:build-op :radiance-bootstrap)
```

## Migrating from Radiance 1.0 to 2.0
In Radiance 2.0 the way environment directories are handled has changed, which breaks the previous bootstrapper's start script. In order to migrate, you should be able to just replace the `start.lisp` file with the current one from this repository.
17 changes: 16 additions & 1 deletion start.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,22 @@

;;; Load Radiance and configure it.
(ql:quickload '(prepl radiance))
(setf radiance:*environment-root* (rad-bootstrap:path "config/"))

(defmethod radiance:environment-directory (environment (kind (eql :configuration)))
(rad-boostrap:path (make-pathname :directory `(:relative "config" ,environment))))

(defmethod radiance:environment-directory (environment (kind (eql :cache)))
(rad-boostrap:path (make-pathname :directory `(:relative "cache" ,environment))))

(defmethod radiance:environment-directory (environment (kind (eql :data)))
(rad-boostrap:path (make-pathname :directory `(:relative "data" ,environment))))

(defmethod radiance:environment-directory (environment (kind (eql :template)))
(rad-boostrap:path (make-pathname :directory `(:relative "override" ,environment "template"))))

(defmethod radiance:environment-directory (environment (kind (eql :static)))
(rad-boostrap:path (make-pathname :directory `(:relative "override" ,environment "static"))))

(radiance:startup)

;;; Load all user modules and things.
Expand Down

0 comments on commit 02975fa

Please sign in to comment.