blob: dbe4a88cb0e9bcb01405f0da5c21ab0e4f05edad (
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
|
(.module:
[lux #*
[abstract
[monad (#+ do)]]
[control
[concurrency
["." promise (#+ Promise) ("#\." monad)]]]
[data
[binary (#+ Binary)]
[text
["." encoding]]
[collection
["." set]]
[format
["." binary]
["." tar]
["." xml]]]
[world
["." file]
["." console (#+ Console)]]]
[program
[compositor
["." export]]]
["." // #_
["#." clean]
["/#" // #_
[repository (#+ Identity Repository)]
[command (#+ Command)]
["/" profile]
["#." action (#+ Action)]
["#." pom]
["#." hash]
["#." artifact (#+ Artifact)
["#/." extension (#+ Extension)]]]])
(def: #export (do! console repository fs identity artifact profile)
(-> (Console Promise) (Repository Promise) (file.System Promise) Identity Artifact (Command Any))
(let [deploy! (: (-> Extension Binary (Action Any))
(\ repository upload identity artifact))]
(do {! ///action.monad}
[library (|> profile
(get@ #/.sources)
set.to-list
(export.library fs)
(\ ! map (binary.run tar.writer)))
pom (promise\wrap (///pom.write profile))
_ (deploy! ///artifact/extension.pom (|> pom (\ xml.codec encode) encoding.to-utf8))
_ (deploy! ///artifact/extension.lux-library library)
_ (deploy! ///artifact/extension.sha-1 (///hash.data (///hash.sha-1 library)))
_ (deploy! ///artifact/extension.md5 (///hash.data (///hash.md5 library)))]
(console.write-line //clean.success console))))
|