Skip to content

Commit

Permalink
Use WITH-SIMPLE-RESTART.
Browse files Browse the repository at this point in the history
  • Loading branch information
orivej committed Dec 1, 2012
1 parent 084cd39 commit 4162246
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions quickdist.lisp
Expand Up @@ -123,24 +123,21 @@ system-index-url: {base-url}/{name}/{version}/systems.txt
(let ((system-files (find-system-files project-path)))
(if (not system-files)
(warn "No .asd files found in ~a, skipping." project-path)
(restart-case
(let* ((tgz-path (archive archive-path project-path))
(project-name (last-directory project-path))
(project-prefix (pathname-name tgz-path))
(project-url (format nil "~a/~a" archive-url (unix-filename tgz-path))))
(format *error-output* "Processing ~a...~%" project-name)
(format release-index "~a ~a ~a ~a ~a ~a~{ ~a~}~%"
project-name project-url (file-size tgz-path) (md5sum tgz-path) (tar-content-sha1 tgz-path) project-prefix
(mapcar #'unix-filename system-files))
(dolist (system-file system-files)
(asdf::load-sysdef (pathname-name system-file) system-file)
(dolist (system-name (get-systems system-file))
(format system-index "~a ~a ~a~{ ~a~}~%"
project-name (pathname-name system-file) system-name
(system-dependencies system-name)))))
(skip-project ()
:report "Skip this project, continue with the next."
nil)))))))))
(with-simple-restart (skip-project "Skip this project, continue with the next.")
(let* ((tgz-path (archive archive-path project-path))
(project-name (last-directory project-path))
(project-prefix (pathname-name tgz-path))
(project-url (format nil "~a/~a" archive-url (unix-filename tgz-path))))
(format *error-output* "Processing ~a...~%" project-name)
(format release-index "~a ~a ~a ~a ~a ~a~{ ~a~}~%"
project-name project-url (file-size tgz-path) (md5sum tgz-path) (tar-content-sha1 tgz-path) project-prefix
(mapcar #'unix-filename system-files))
(dolist (system-file system-files)
(asdf::load-sysdef (pathname-name system-file) system-file)
(dolist (system-name (get-systems system-file))
(format system-index "~a ~a ~a~{ ~a~}~%"
project-name (pathname-name system-file) system-name
(system-dependencies system-name)))))))))))))

(defun quickdist (&key name (version :today) base-url projects-dir dists-dir)
(let* ((version (if (not (eq version :today)) version (format-date (get-universal-time))))
Expand Down

0 comments on commit 4162246

Please sign in to comment.