aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-11-07 00:29:40 -0400
committerEduardo Julian2020-11-07 00:29:40 -0400
commit2e5852abb1ac0ae5abdd8709238aca447f62520e (patch)
tree1b73a24205217c9e00f7f17d5972f67735a7cc69 /stdlib/source/program/aedifex.lux
parentef78c1f92ab29c4370193591b170535dd9e743f7 (diff)
Pure-Lux implementation for biggest and smallest Frac values.
Diffstat (limited to 'stdlib/source/program/aedifex.lux')
-rw-r--r--stdlib/source/program/aedifex.lux36
1 files changed, 30 insertions, 6 deletions
diff --git a/stdlib/source/program/aedifex.lux b/stdlib/source/program/aedifex.lux
index d4c9036f3..a9b4c9514 100644
--- a/stdlib/source/program/aedifex.lux
+++ b/stdlib/source/program/aedifex.lux
@@ -4,15 +4,16 @@
[monad (#+ do)]]
[control
[pipe (#+ do>)]
- ["." try (#+ Try)]
["." io (#+ IO)]
+ ["." try (#+ Try)]
+ ["." exception (#+ exception:)]
[parser
["." cli (#+ program:)]
["<c>" code]]
[security
["!" capability]]
[concurrency
- ["." promise (#+ Promise)]]]
+ ["." promise (#+ Promise) ("#@." monad)]]]
[data
[binary (#+ Binary)]
["." text
@@ -21,7 +22,8 @@
[format
["." xml]]
[collection
- ["." set]]]
+ ["." set]
+ ["." dictionary (#+ Dictionary)]]]
[tool
[compiler
[language
@@ -38,6 +40,7 @@
["#." pom]
["#." cli]
["#." cache]
+ ["#." repository (#+ Address)]
["#." dependency #_
["#" resolution]]
["#." command
@@ -70,6 +73,14 @@
(log! (format "Could not resolve dependencies:" text.new-line
error))))))
+(exception: (cannot-find-repository {repository Text}
+ {options (Dictionary Text Address)})
+ (exception.report
+ ["Repository" (%.text repository)]
+ ["Options" (exception.enumerate (function (_ [name repo])
+ (format (%.text name) " := " (%.text repo)))
+ (dictionary.entries options))]))
+
(program: [{[profile operation] /cli.command}]
(do {! io.monad}
[?profile (/input.read io.monad file.default profile)]
@@ -92,10 +103,23 @@
(exec (/command/install.do! (file.async file.default) profile)
(wrap []))
- (#/cli.Deploy repository user password)
- (exec (/command/deploy.do! repository user password profile)
- (wrap []))
+ (#/cli.Deploy repository identity)
+ (exec (case [(get@ #/.identity profile)
+ (dictionary.get repository (get@ #/.deploy-repositories profile))]
+ [(#.Some artifact) (#.Some repository)]
+ (/command/deploy.do! (/repository.async (/repository.default repository))
+ (file.async file.default)
+ identity
+ artifact
+ profile)
+ [#.None _]
+ (promise@wrap (exception.throw /.no-identity []))
+
+ [_ #.None]
+ (promise@wrap (exception.throw ..cannot-find-repository [repository (get@ #/.deploy-repositories profile)])))
+ (wrap []))
+
(#/cli.Compilation compilation)
(case compilation
#/cli.Build (exec (/command/build.do! profile)