mirror of
https://github.com/roswell/roswell.git
synced 2026-09-10 07:16:17 -04:00
fix ci for making debian package.
This commit is contained in:
parent
04b495d76b
commit
b516ad6972
22
debian/debian.ros
vendored
22
debian/debian.ros
vendored
|
|
@ -5,7 +5,7 @@ exec ros -Q -L sbcl-bin -- $0 "$@"
|
||||||
|#
|
|#
|
||||||
(progn ;;init forms
|
(progn ;;init forms
|
||||||
(ros:ensure-asdf)
|
(ros:ensure-asdf)
|
||||||
#+quicklisp (ql:quickload '(:cl-html-parse :uiop :dexador) :silent t))
|
#+quicklisp (ql:quickload '(:jonathan :uiop :dexador) :silent t))
|
||||||
|
|
||||||
(defpackage :ros.script.debian.3703769507
|
(defpackage :ros.script.debian.3703769507
|
||||||
(:use :cl))
|
(:use :cl))
|
||||||
|
|
@ -20,24 +20,16 @@ exec ros -Q -L sbcl-bin -- $0 "$@"
|
||||||
(if branch
|
(if branch
|
||||||
(format nil "https://github.com/~A/archive/~A.tar.gz" base branch)
|
(format nil "https://github.com/~A/archive/~A.tar.gz" base branch)
|
||||||
(multiple-value-bind (body res)
|
(multiple-value-bind (body res)
|
||||||
(dex:get (format nil "https://github.com/~A/releases/" base))
|
(dex:get (format nil "https://api.github.com/repos/~A/releases" base)
|
||||||
|
:headers '(("X-GitHub-Api-Version" . "2022-11-28")))
|
||||||
(when (= res 200)
|
(when (= res 200)
|
||||||
(net.html.parser:parse-html
|
(getf (first (jojo:parse body)) :|tarball_url|))))))
|
||||||
body
|
|
||||||
:callbacks
|
|
||||||
(list (cons :a (lambda (arg)
|
|
||||||
(let ((href (getf (cdr (car arg)) :href)))
|
|
||||||
(when (and (> (length href) 6)
|
|
||||||
(equal (subseq href (-(length href) 6))
|
|
||||||
"tar.gz")
|
|
||||||
;; href which include "archive" not "release"
|
|
||||||
(eql (aref href (1+ (position #\a href))) #\r))
|
|
||||||
(return-from get-newest-url (format nil "https://github.com~A" href)))))))
|
|
||||||
:callback-only t))))))
|
|
||||||
|
|
||||||
(defun fetch-upstream (&optional (output *pwd*))
|
(defun fetch-upstream (&optional (output *pwd*))
|
||||||
(let* ((url (get-newest-url "roswell/roswell"))
|
(let* ((url (get-newest-url "roswell/roswell"))
|
||||||
(path (merge-pathnames (subseq url (1+ (position #\/ url :from-end t))) output)))
|
(path (make-pathname :name (format nil "roswell_~A.tar" (subseq url (1+ (position #\/ url :from-end t))))
|
||||||
|
:defaults output
|
||||||
|
:type "gz")))
|
||||||
(roswell.util:download url path)
|
(roswell.util:download url path)
|
||||||
path))
|
path))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue