Commit b0c0f894 authored by Eric Timmons's avatar Eric Timmons
Browse files

Actually read client tarball into image

parent 7a3ef37c
......@@ -16,4 +16,4 @@
(:file "features" :depends-on ("package"))
(:file "system" :depends-on ("package" "features"))
(:file "dependencies-license-op" :depends-on ("package" "system"))
(:file "client" :depends-on ("package"))))
(:file "client" :depends-on ("package" "system"))))
......@@ -34,3 +34,27 @@
:for in :in input-files
:for out :in output-files
:do (funcall (uiop:find-symbol* :copy-file :asdf-release-ops) in out))))
(defclass build-clpm-client-tarball-op (asdf:non-propagating-operation)
())
(defmethod asdf:input-files ((o build-clpm-client-tarball-op) (c clpm-system))
(list*
(asdf:system-source-file :clpm-client)
(asdf:input-files 'asdf:concatenate-source-op :clpm-client)))
(defmethod asdf:output-files ((o build-clpm-client-tarball-op) c)
(list (uiop:subpathname (asdf:component-pathname (asdf:find-system :clpm-client))
"clpm-client.tar.gz")))
(defmethod asdf:perform ((o build-clpm-client-tarball-op) c)
(let ((input-files (asdf:input-files o c))
(output-file (asdf:output-file o c)))
(uiop:with-current-directory ((asdf:system-source-directory :clpm))
(setf input-files (mapcar (lambda (p)
(uiop:enough-pathname p (uiop:getcwd)))
input-files))
(setf output-file (uiop:enough-pathname output-file (uiop:getcwd)))
(uiop:run-program `("tar" "czf" ,(uiop:native-namestring output-file)
,@(mapcar #'uiop:native-namestring input-files)))
t)))
......@@ -6,6 +6,7 @@
(uiop:define-package #:clpm-asdf
(:use #:cl)
(:local-nicknames (#:ops #:asdf-release-ops))
(:export #:clpm-system))
(:export #:build-clpm-client-tarball-op
#:clpm-system))
(in-package #:clpm-asdf)
......@@ -50,5 +50,6 @@
(:readme-file "README")
(:dependencies-license-file "BUNDLED-LICENSES"))))))))
:in-order-to ((program-op (load-op :clpm-cli))
(load-op (concatenate-source-op :clpm-client))
(load-op (concatenate-source-op :clpm-client)
(clpm-asdf:build-clpm-client-tarball-op :clpm))
(asdf-release-ops:perform-program-image-op (load-op :clpm-cli))))
......@@ -8,6 +8,7 @@
#:clpm/archives
#:clpm/data
#:clpm/version)
(:import-from #:alexandria)
(:import-from #:flexi-streams
#:make-in-memory-input-stream)
(:export #:*clpm-client-asd-pathname*
......@@ -17,7 +18,9 @@
(in-package #:clpm/client)
(defvar *clpm-client-tarball-contents* nil)
(defparameter *clpm-client-tarball-contents*
(alexandria:read-file-into-byte-vector (asdf:output-file 'clpm-asdf:build-clpm-client-tarball-op :clpm)))
(defparameter *clpm-client-concatenated-source*
(uiop:read-file-string (asdf:output-file 'asdf:concatenate-source-op :clpm-client)))
......
Supports Markdown
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