Page MenuHomeSoftware Heritage

No OneTemporary

diff --git a/.gitignore b/.gitignore
index 8b0ffe7..1120f7a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-docker/config.lisp
+/config/config.lisp
+/config/config.lisp.original
diff --git a/bin/build-config-tmpl b/bin/build-config-tmpl
index 9193664..3cc87b7 100755
--- a/bin/build-config-tmpl
+++ b/bin/build-config-tmpl
@@ -1,66 +1,72 @@
#!/usr/bin/env -S /usr/bin/sbcl --script
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))
+;; Make sure we can provide path to forgerie code...
+(let ((forgerie-path (uiop:getenv "FORGERIE_PATH")))
+ (when (and forgerie-path (probe-file forgerie-path))
+ (push (pathname forgerie-path) asdf:*central-registry*)))
+
+;; so quicklisp is able to run the forgerie code and execute the script
(ql:quickload :forgerie)
(with-open-file (str "config/config.lisp.tmpl" :direction :output :if-exists :supersede)
(format str
";;;; This template file is generated by bin/build-config-templ and should not be edited manually.
;;;;
;;;; Install by copying to config.lisp~%~%")
(mapcar
(lambda (section)
(format str ";;;;;;;;;;;;;;;;;;;~%;;; ~A~%;;;;;;;;;;;;;;;;;;;~%~%" (car section))
(mapcar
(lambda (variable-def)
(let
((variable-name (if (listp variable-def) (car variable-def) variable-def))
(default (if (listp variable-def) (cadr variable-def) "nil")))
(format str
"~{;~A~%~}(setf ~(~A~):~(~A~) ~A)~%~%"
(mapcar
(lambda (line)
(if (< 0 (length line))
(cl-ppcre:regex-replace-all "^ ?" line " ")
""))
(cl-ppcre:split "\\n" (documentation variable-name 'variable)))
(package-name (symbol-package variable-name))
(symbol-name variable-name)
default
)))
(cdr section)))
'(("system"
(sb-impl::*default-external-format* ":UTF-8")
(drakma:*drakma-default-external-format* "'UTF-8"))
("core"
forgerie-core:*debug*
forgerie-core:*log-mapping-errors*
forgerie-core:*working-directory*)
("phabricator"
forgerie-phabricator:*database-password*
forgerie-phabricator:*database-username*
forgerie-phabricator:*revisions-to-skip*
forgerie-phabricator:*phabricator-location*
forgerie-phabricator:*project-assignment-overrides*
forgerie-phabricator:*repository-overrides*
forgerie-phabricator:*pastes-to-skip*
forgerie-phabricator:*user-overrides*
forgerie-phabricator:*storage-location*
forgerie-phabricator:*confidential-space-phids*
forgerie-phabricator:*included-repositories*
forgerie-phabricator:*staging-repository*
forgerie-phabricator:*email-address-sanitizer*)
("gitlab"
forgerie-gitlab:*private-token*
forgerie-gitlab:*server-address*
forgerie-gitlab:*default-project*
forgerie-gitlab:*ssh-public-key*
forgerie-gitlab:*default-group*
forgerie-gitlab:*rails-console-ssh-args*
forgerie-gitlab:*merge-request-suffix*
forgerie-gitlab:*ticket-suffix*
forgerie-gitlab:*limit-to-active-users*))))
diff --git a/bin/postmortem b/bin/postmortem
index c8e73f6..9290865 100755
--- a/bin/postmortem
+++ b/bin/postmortem
@@ -1,10 +1,15 @@
#!/usr/bin/env -S /usr/bin/sbcl --dynamic-space-size 4096 --script
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))
+;; Make sure we can provide path to forgerie code...
+(let ((forgerie-path (uiop:getenv "FORGERIE_PATH")))
+ (when (and forgerie-path (probe-file forgerie-path))
+ (push (pathname forgerie-path) asdf:*central-registry*)))
+
(ql:quickload :forgerie)
(forgerie-core:postmortem :phabricator :gitlab)
diff --git a/bin/run b/bin/run
index b01a485..128866c 100755
--- a/bin/run
+++ b/bin/run
@@ -1,10 +1,16 @@
#!/usr/bin/env -S /usr/bin/sbcl --dynamic-space-size 4096 --script
+
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))
+;; Make sure we can provide path to forgerie code...
+(let ((forgerie-path (uiop:getenv "FORGERIE_PATH")))
+ (when (and forgerie-path (probe-file forgerie-path))
+ (push (pathname forgerie-path) asdf:*central-registry*)))
+
(ql:quickload :forgerie)
(forgerie-core:run :phabricator :gitlab)

File Metadata

Mime Type
text/x-diff
Expires
Jul 4 2025, 7:42 AM (10 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3271005

Event Timeline