-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathclient-uploader.lisp
50 lines (45 loc) · 2.11 KB
/
client-uploader.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
;;;; client-uploader.lisp
(in-package #:quicklisp-controller)
(defparameter *quickstart-bucket* "beta.quicklisp.org")
(defun invalidate-quickstart-paths (paths)
(let ((distributions (zs3:distributions-for-bucket *quickstart-bucket*))
(paths (mapcar (lambda (path)
(if (char= (char path 0) #\/)
path
(format nil "/~A" path)))
paths)))
(dolist (distribution distributions)
(zs3:invalidate-paths distribution paths))))
(defun upload-client-files ()
(with-posix-cwd "~/src/quicklisp-client/"
(run "make")
(let* ((version (first-line-of "version.txt"))
(versioned-key (format nil "quickstart/quicklisp-~A.tgz" version)))
(zs3:put-file "quicklisp.tar"
*quickstart-bucket* "quickstart/quicklisp.tar"
:public t)
(zs3:put-file (file-namestring versioned-key)
*quickstart-bucket* versioned-key
:public t)
(zs3:put-file "version.txt" *quickstart-bucket* "quickstart/version.txt"
:public t :content-type "text/plain")
(invalidate-quickstart-paths (list "/quickstart/version.txt"
"/quickstart/quicklisp.tar"
versioned-key)))))
(defun upload-bootstrap-files ()
(with-posix-cwd "~/src/quicklisp-bootstrap/"
(zs3:put-file "asdf.lisp"
*quickstart-bucket*
"quickstart/asdf.lisp"
:public t
:content-type "text/plain")
(zs3:put-file "quicklisp.lisp" *quickstart-bucket* "quicklisp.lisp"
:public t
:content-type "text/plain"
:content-disposition "attachment")
(zs3:put-file "setup.lisp" *quickstart-bucket* "quickstart/setup.lisp"
:public t
:content-type "text/plain")
(invalidate-quickstart-paths '("/quicklisp.lisp"
"/quickstart/asdf.lisp"
"/quickstart/setup.lisp"))))