From 539090419375f13ffd325a28c70075b2f5bb803b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Le=20Barbier?= Date: Sun, 17 Sep 2023 14:28:14 +0200 Subject: [PATCH] Prepare DEVELOPMENT system --- .github/workflows/continuous-integration.yaml | 1 + libexec/lisp/development.lisp | 76 +++++++++++++++++++ libexec/lisp/setup.lisp | 35 --------- libexec/setup/apt | 2 +- libexec/setup/bsdowl | 6 +- libexec/setup/hier | 2 +- libexec/setup/quicklisp | 6 +- libexec/setup/sbcl | 6 +- libexec/setup/testimage | 2 +- libexec/setup/users | 3 +- libexec/testimage/linux | 6 +- org.melusina.atelier.asd | 9 +++ 12 files changed, 104 insertions(+), 50 deletions(-) create mode 100644 libexec/lisp/development.lisp delete mode 100644 libexec/lisp/setup.lisp diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index c0ef8e3..8e8f6d7 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -12,3 +12,4 @@ jobs: testsuite-entrypoint: 'run-all-tests' linter-system: 'org.melusina.atelier/development' linter-entrypoint: 'lint' + diff --git a/libexec/lisp/development.lisp b/libexec/lisp/development.lisp new file mode 100644 index 0000000..0162bb8 --- /dev/null +++ b/libexec/lisp/development.lisp @@ -0,0 +1,76 @@ +;;;; development.lisp — Project Development for Atelier + +;;;; Atelier (https://github.com/melusina-org/cl-atelier) +;;;; This file is part of Atelier. +;;;; +;;;; Copyright © 2017–2023 Michaël Le Barbier +;;;; All rights reserved. + +;;;; This file must be used under the terms of the MIT License. +;;;; This source file is licensed as described in the file LICENSE, which +;;;; you should have received as part of this distribution. The terms +;;;; are also available at https://opensource.org/licenses/MIT + +(defpackage #:org.melusina.atelier/development + (:use #:cl) + (:local-nicknames + (#:atelier #:org.melusina.atelier)) + (:export + #:lint + #+quicklisp + #:reload)) + +(in-package #:org.melusina.atelier/development) + +(defun system-relative-pathname (pathname) + (flet ((system-source-directory () + (asdf:system-source-directory #.(string-downcase (package-name *package*))))) + (merge-pathnames pathname (system-source-directory)))) + +(defun system-relative-pathnames (&rest pathnames) + (mapcar #'system-relative-pathname pathnames)) + +(defparameter *parameter-bindings* + '((:copyright-holder . "Michaël Le Barbier") + (:copyright-year . "2017–2023") + (:project-filename . "atelier") + (:project-name . "Atelier") + (:project-description . "Atelier for Lisp developers") + (:project-long-description . + #.(concatenate 'string + "The atelier for Lisp developers is providing useful tools for Lisp developpers" + " such as project templates and a linter.")) + (:homepage . "https://github.com/melusina-org/cl-atelier") + (:license . :mit))) + +(defun lint () + (let ((atelier:*parameter-bindings* *parameter-bindings*)) + (atelier:lint + (system-relative-pathnames + #p"org.melusina.atelier.asd" + #p"development" + #p"doc" + #p"docker" + #p"src" + #p"subr" + #p"testsuite" + #p"libexec/lisp/development.lisp" + #p"libexec/setup" + #p"libexec/testimage")))) + +#+quicklisp +(defun reload () + (ql:quickload '("org.melusina.confidence" + "org.melusina.atelier" + "org.melusina.atelier/development" + "org.melusina.atelier/testsuite"))) + + +;;;; +;;;; Command Stock +;;;; + +#+nil +(org.melusina.atelier/development:reload) + +;;;; End of file `development.lisp' diff --git a/libexec/lisp/setup.lisp b/libexec/lisp/setup.lisp deleted file mode 100644 index 9a86f76..0000000 --- a/libexec/lisp/setup.lisp +++ /dev/null @@ -1,35 +0,0 @@ -;;;; setup.lisp — Setup for Atelier - -;;;; Atelier (https://github.com/melusina-org/cl-atelier) -;;;; This file is part of Atelier. -;;;; -;;;; Copyright © 2017–2023 Michaël Le Barbier -;;;; All rights reserved. - -;;;; This file must be used under the terms of the MIT License. -;;;; This source file is licensed as described in the file LICENSE, which -;;;; you should have received as part of this distribution. The terms -;;;; are also available at https://opensource.org/licenses/MIT - -(in-package #:cl-user) - -;;; -;;; Atelier -;;; - -(ql:quickload "org.melusina.atelier" :silent t) - -(setf org.melusina.atelier:*parameter-bindings* - '((:copyright-holder . "Michaël Le Barbier") - (:copyright-year . "2017–2023") - (:project-filename . "atelier") - (:project-name . "Atelier") - (:project-description . "Atelier for Lisp developers") - (:project-long-description . - #.(concatenate 'string - "The atelier for Lisp developers is providing useful tools for Lisp developpers" - " such as project templates and a linter.")) - (:homepage . "https://github.com/melusina-org/cl-atelier") - (:license . :mit))) - -;;;; End of file `setup.lisp' diff --git a/libexec/setup/apt b/libexec/setup/apt index 8f0ba18..323abea 100755 --- a/libexec/setup/apt +++ b/libexec/setup/apt @@ -5,7 +5,7 @@ # Atelier (https://github.com/melusina-org/cl-atelier) # This file is part of Atelier. # -# Copyright © 2017–2022 Michaël Le Barbier +# Copyright © 2017–2023 Michaël Le Barbier # All rights reserved. # This file must be used under the terms of the MIT License. diff --git a/libexec/setup/bsdowl b/libexec/setup/bsdowl index f86caff..83aa28a 100755 --- a/libexec/setup/bsdowl +++ b/libexec/setup/bsdowl @@ -1,11 +1,11 @@ #!/bin/sh -### bsdowl -- Setup BSD Owl +# bsdowl — Setup BSD Owl # Atelier (https://github.com/melusina-org/cl-atelier) # This file is part of Atelier. # -# Copyright © 2017–2022 Michaël Le Barbier +# Copyright © 2017–2023 Michaël Le Barbier # All rights reserved. # This file must be used under the terms of the MIT License. @@ -67,4 +67,4 @@ bsdowl_main() bsdowl_main "$@" -### End of file `bsdowl' +# End of file `bsdowl' diff --git a/libexec/setup/hier b/libexec/setup/hier index 77a65b7..44f051a 100755 --- a/libexec/setup/hier +++ b/libexec/setup/hier @@ -5,7 +5,7 @@ # Atelier (https://github.com/melusina-org/cl-atelier) # This file is part of Atelier. # -# Copyright © 2017–2022 Michaël Le Barbier +# Copyright © 2017–2023 Michaël Le Barbier # All rights reserved. # This file must be used under the terms of the MIT License. diff --git a/libexec/setup/quicklisp b/libexec/setup/quicklisp index 3df3135..c80dcc0 100755 --- a/libexec/setup/quicklisp +++ b/libexec/setup/quicklisp @@ -1,11 +1,11 @@ #!/bin/sh -### quicklisp -- Setup quicklisp +# quicklisp — Setup quicklisp # Atelier (https://github.com/melusina-org/cl-atelier) # This file is part of Atelier. # -# Copyright © 2017–2022 Michaël Le Barbier +# Copyright © 2017–2023 Michaël Le Barbier # All rights reserved. # This file must be used under the terms of the MIT License. @@ -207,4 +207,4 @@ quicklisp_main() quicklisp_main "$@" -### End of file `quicklisp' +# End of file `quicklisp' diff --git a/libexec/setup/sbcl b/libexec/setup/sbcl index ac24adc..2bd5f70 100755 --- a/libexec/setup/sbcl +++ b/libexec/setup/sbcl @@ -1,9 +1,11 @@ #!/bin/sh +# sbcl — Install SBCL + # Atelier (https://github.com/melusina-org/cl-atelier) # This file is part of Atelier. # -# Copyright © 2017–2022 Michaël Le Barbier +# Copyright © 2017–2023 Michaël Le Barbier # All rights reserved. # This file must be used under the terms of the MIT License. @@ -14,3 +16,5 @@ env DEBIAN_FRONTEND=noninteractive apt-get install -y\ sbcl\ cl-quicklisp + +# End of file `sbcl' diff --git a/libexec/setup/testimage b/libexec/setup/testimage index 72f97b8..b9951cc 100755 --- a/libexec/setup/testimage +++ b/libexec/setup/testimage @@ -5,7 +5,7 @@ # Atelier (https://github.com/melusina-org/cl-atelier) # This file is part of Atelier. # -# Copyright © 2017–2022 Michaël Le Barbier +# Copyright © 2017–2023 Michaël Le Barbier # All rights reserved. # This file must be used under the terms of the MIT License. diff --git a/libexec/setup/users b/libexec/setup/users index 626f1bb..edb1748 100755 --- a/libexec/setup/users +++ b/libexec/setup/users @@ -2,11 +2,10 @@ # users — Setup users - # Atelier (https://github.com/melusina-org/cl-atelier) # This file is part of Atelier. # -# Copyright © 2017–2022 Michaël Le Barbier +# Copyright © 2017–2023 Michaël Le Barbier # All rights reserved. # This file must be used under the terms of the MIT License. diff --git a/libexec/testimage/linux b/libexec/testimage/linux index f427e2e..6e4e474 100755 --- a/libexec/testimage/linux +++ b/libexec/testimage/linux @@ -1,11 +1,11 @@ #!/bin/sh -# testimage — Test Docker Image for Personalised Linux system +# linux — Test Docker Image for Personalised Linux system # Atelier (https://github.com/melusina-org/cl-atelier) # This file is part of Atelier. # -# Copyright © 2017–2022 Michaël Le Barbier +# Copyright © 2017–2023 Michaël Le Barbier # All rights reserved. # This file must be used under the terms of the MIT License. @@ -21,4 +21,4 @@ test -x /usr/bin/bsdtar test -f "/opt/${PACKAGE}/share/bsdowl/bps.uses.mk" id atelier -# End of file `testimage' +# End of file `linux' diff --git a/org.melusina.atelier.asd b/org.melusina.atelier.asd index 65f255c..5f960fd 100644 --- a/org.melusina.atelier.asd +++ b/org.melusina.atelier.asd @@ -61,4 +61,13 @@ (:file "lint") (:file "entrypoint"))))) +(asdf:defsystem #:org.melusina.atelier/development + :description "Development tools for Atelier" + :author "Michaël Le Barbier" + :license "MIT License" + :depends-on (#:org.melusina.atelier) + :components + ((:module "libexec/lisp" + :components ((:file "development"))))) + ;;;; End of file `org.melusina.atelier.asd'