blob: 0a70eabfd92a5c5d3de0fc6fcd1b64efa8bd03b9 (
plain)
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
51
|
This is a really hacky plugin for spiffy that allows you to serve
automatically-generated release-info files and files-list files
(the latter of which serves as the files section of a meta-file)
for an SVN repository.
It assumes the svn repository location contains a toplevel directory
named after the major CHICKEN release, with subdirectories matching
the names of eggs. Those egg directories contain a "tags" directory
for each revision, with the revision number as its name:
/4
/MY-EGG
/tags
/1.0
/1.1
/ANOTHER-EGG
/tags
/0.1
/0.2
/1.0
/5
/MY-EGG
/tags
/2.0
/2.1
/SOME-NEWER-EGG
/tags
/0.1
You can use it like this:
(use spiffy spiffy-uri-match pseudo-meta-egg-info)
;; Trailing slash is mandatory here!
;; The {chicken-release} placeholder gets replaced by the major CHICKEN version.
;; By default this uses the Chicken repo.
(egg-repo "http://example.com/your-egg-repo/eggs/release/{chicken-release}/")
(vhost-map `((".*"
. ,(uri-match/spiffy
`(((/ "release-info") (GET ,release-info))
((/ "files-list") (GET ,files-list)))))))
(start-server)
This makes the release-info for the CHICKEN 4 version of egg MY-EGG, available under
http://localhost:8080/release-info?egg=MY-EGG;release=4
and the files-list for release 1.0 for the CHICKEN 5 version of MY-EGG under
http://localhost:8080/files-list?egg=MY-EGG;release=1.0;release=5
|