Commit 4f4c7d03 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

Release 4.1.4

Have release script use cl-scripting.
dispatch: have main as unexported alias for dispatcher.
parent 4a4ec3d8
TODO for cl-launch as of 4.1.3
TODO for cl-launch as of 4.1.4
* When resuming from an image then dumping another, the INCLUDE_PATH
becomes a very bad variable to look for the image.
......
#!/bin/sh
#| cl-launch.sh -- shell wrapper for Common Lisp -*- Lisp -*-
CL_LAUNCH_VERSION='4.1.3.3'
CL_LAUNCH_VERSION='4.1.4'
license_information () {
AUTHOR_NOTE="\
# Please send your improvements to the author:
......@@ -196,7 +196,7 @@ Recent Linux kernels support a script interpreter itself being a script;
BSD kernels don't and require a small C program cl-shim to be compiled and
installed as /usr/bin/cl to use cl-launch this way.
To work properly, \`cl-launch\` 4.1.3 depends on \`ASDF\` 3.1.2 or later, and
To work properly, \`cl-launch\` 4.1.4 depends on \`ASDF\` 3.1.2 or later, and
on its portability layer \`UIOP\`, to manage compilation and image life cycle.
The software is specified as the evaluation of code in several phases;
......
cl-launch (4.1.4-1) unstable; urgency=low
* Don't forget to install dispatch.lisp as source!
* Minor tweaks for dispatch.lisp.
* Minor documentation update.
* Update LispWorks support for LW 7.0.0
* Remove support for ASDF < 3.1.2
-- Francois-Rene Rideau <fare@tunes.org> Tue, 21 Jul 2015 23:31:13 -0400
cl-launch (4.1.3-1) unstable; urgency=low
* New options --system-main and --dispatch-system
......
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "CL\-LAUNCH" "1" "May 2015" "Francois-Rene Rideau" "Shell Scripting with Common Lisp"
.TH "CL\-LAUNCH" "1" "July 2015" "Francois-Rene Rideau" "Shell Scripting with Common Lisp"
.
.SH "Name"
cl\-launch \- shell wrapper for Common Lisp
......@@ -105,7 +105,7 @@ A suggested short\-hand name for \fBcl\-launch\fR is \fBcl\fR (you may create a
(See \fISimple cl\-launch scripts\fR below for caveats with \fB#!\fR scripts though\.) Recent Linux kernels support a script interpreter itself being a script; BSD kernels don\'t and require a small C program cl\-shim to be compiled and installed as /usr/bin/cl to use cl\-launch this way\.
.
.P
To work properly, \fBcl\-launch\fR 4\.1\.3 depends on \fBASDF\fR 3\.1\.2 or later, and on its portability layer \fBUIOP\fR, to manage compilation and image life cycle\.
To work properly, \fBcl\-launch\fR 4\.1\.4 depends on \fBASDF\fR 3\.1\.2 or later, and on its portability layer \fBUIOP\fR, to manage compilation and image life cycle\.
.
.P
The software is specified as the evaluation of code in several phases; the distinction matters most for creating executable binaries, but understanding the evaluation model can avoid surprises in other cases too\.
......
......@@ -71,5 +71,9 @@ If NAME is NIL, return the value of *DEFAULT-BEHAVIOR*."
(defun dispatch-entry (argv &optional (name (get-name)))
(funcall (or (get-entry name) *default-behavior*) argv))
;; The below function is NOT exported, but you can use :import-from so -Ds works trivially with some system of yours:
(defun main (argv)
(dispatcher argv))
(when (null *image-entry-point*)
(setf *image-entry-point* #'dispatcher))
#| -*- Lisp -*-
#!/usr/bin/cl -sm cl-launch/release
exec "$(dirname $0)/cl-launch.sh" -X --system-main cl-launch/release -- "$0" "$@" ; exit
#!/usr/bin/cl -Ds cl-launch/release
exec "$(dirname $0)/cl-launch.sh" -X --dispatch-system cl-launch/release -- "$0" "$@" ; exit
|#
(defpackage :cl-launch/release
(:use :cl :uiop :asdf :inferior-shell :optima :optima.ppcre)
(:use :cl :uiop :asdf :fare-utils :optima :optima.ppcre
:inferior-shell :cl-scripting :cl-launch/dispatch)
(:import-from :cl-launch/dispatch #:main)
;; Note: these exports are also the list of available commands.
(:export #:rep #:clean #:manpage
#:source #:quickrelease
#:get-date-from-git #:check-manual
#:debian-version #:script-version
#:debian-package #:publish-debian-package #:debian-package-all))
(in-package :cl-launch/release)
......@@ -62,7 +65,7 @@ exec "$(dirname $0)/cl-launch.sh" -X --system-main cl-launch/release -- "$0" "$@
(defun clean ()
(with-current-directory ((pn))
(run '(git clean -xfd)))
(values))
(success))
(defun debian-package ()
(let* ((debian-version (debian-version))
......@@ -98,7 +101,8 @@ exec "$(dirname $0)/cl-launch.sh" -X --system-main cl-launch/release -- "$0" "$@
(run `(pwd) :show t)
(run/interactive `(gpg -b -a (cl-launch- ,version .tar.gz)) :show t)
(run `(ln -sf (,cl-launch-version .tar.gz) cl-launch.tar.gz) :show t)
(run `(ln -sf (,cl-launch-version .tar.gz.asc) cl-launch.tar.gz.asc) :show t))))
(run `(ln -sf (,cl-launch-version .tar.gz.asc) cl-launch.tar.gz.asc) :show t)))
(success))
(defun publish-debian-package ()
(let* ((debian-version (debian-version))
......@@ -107,11 +111,12 @@ exec "$(dirname $0)/cl-launch.sh" -X --system-main cl-launch/release -- "$0" "$@
(with-current-directory (cldir)
(run `(dput mentors (cl-launch_ ,debian-version _ ,(debian-arch) .changes)) :show t)
(run `(rsync -av --delete ,cldir "common-lisp.net:/project/xcvb/public_html/cl-launch/") :show t)))
(values))
(success))
(defun source ()
(with-current-directory ((pn))
(run `(./cl-launch.sh --include ,(getcwd) "-B" install_path))))
(run `(./cl-launch.sh --include ,(getcwd) "-B" install_path)))
(success))
(defparameter *months* #("January" "February" "March" "April" "May" "June"
"July" "August" "September" "October" "November" "December"))
......@@ -136,7 +141,8 @@ exec "$(dirname $0)/cl-launch.sh" -X --system-main cl-launch/release -- "$0" "$@
(date-from-git (subseq (get-date-from-git) 0 2)))
(assert (equal date-from-manual date-from-git) ()
"Manual says it's from ~{~D-~2,'0D~} but git commit is from ~{~D-~2,'0D~}"
date-from-manual date-from-git)))
date-from-manual date-from-git))
(success))
(defun manpage ()
;;(check-manual-git-dates-match)
......@@ -146,13 +152,15 @@ exec "$(dirname $0)/cl-launch.sh" -X --system-main cl-launch/release -- "$0" "$@
(run `(ronn "--roff" "--manual=Shell Scripting with Common Lisp"
"--organization=Francois-Rene Rideau"
,(format nil "--date=~{~D-~2,'0D-~2,'0D~}" (get-date-from-git))
cl-launch.1.md (> 2 /dev/null)))))
cl-launch.1.md (> 2 /dev/null))))
(success))
(defun check-manual ()
;;(check-manual-git-dates-match)
(manpage)
(with-current-directory ((pn))
(run `(cmp ./cl-launch.1 ./debian/cl-launch.1))))
(run `(cmp ./cl-launch.1 ./debian/cl-launch.1)))
(success))
(defun quickrelease ()
(let* ((version (script-version)) ;; no need to compare with the debian version
......@@ -171,7 +179,7 @@ exec "$(dirname $0)/cl-launch.sh" -X --system-main cl-launch/release -- "$0" "$@
"common-lisp.net:/project/xcvb/public_html/cl-launch/"))
(run `(ssh common-lisp.net ln -sf ,tarball /project/xcvb/public_html/cl-launch/cl-launch.tar.gz))
(run `(rm -f ,link ,tarball))))
(values))
(success))
(defun debian-package-all ()
(debian-package)
......@@ -180,11 +188,4 @@ exec "$(dirname $0)/cl-launch.sh" -X --system-main cl-launch/release -- "$0" "$@
(defun valid-commands ()
(sort (while-collecting (c) (do-external-symbols (x :cl-launch/release) (c x))) #'string<))
(defun main (argv)
(multiple-value-bind (command status)
(find-symbol (string-upcase (first argv)) :cl-launch/release)
(if (eq status :external)
(format t "~@[~{~S~^ ~}~%~]" (multiple-value-list (apply command (rest argv))))
(die 2 "~A ~:[requires a command~;doesn't recognize command ~:*~A~].~%Try one of: ~(~{~A~^ ~}~)~%"
(argv0) (first argv) (valid-commands))))
t) ;; success according to uiop:restore-image.
(register-commands :cl-launch/release)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment