diff options
Diffstat (limited to 'stdlib/source/program/aedifex/command')
-rw-r--r-- | stdlib/source/program/aedifex/command/build.lux | 9 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/command/deploy.lux | 3 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/command/deps.lux | 37 |
3 files changed, 44 insertions, 5 deletions
diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux index 2e3e464a2..623a20841 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -26,6 +26,7 @@ ["#." command (#+ Command)] ["#." local] ["#." cache] + ["#." repository] ["#." dependency (#+ Dependency) ["#/." resolution (#+ Resolution)]] ["#." shell] @@ -128,10 +129,10 @@ [cache (///cache.read-all (file.async file.default) (set.to-list (get@ #///.dependencies profile)) ///dependency/resolution.empty) - resolution (promise.future - (///dependency/resolution.resolve-all (set.to-list (get@ #///.repositories profile)) - (set.to-list (get@ #///.dependencies profile)) - cache)) + resolution (///dependency/resolution.all (list@map (|>> ///repository.remote ///repository.async) + (set.to-list (get@ #///.repositories profile))) + (set.to-list (get@ #///.dependencies profile)) + cache) _ (///cache.write-all (file.async file.default) resolution) [resolution compiler] (promise@wrap (..compiler resolution)) diff --git a/stdlib/source/program/aedifex/command/deploy.lux b/stdlib/source/program/aedifex/command/deploy.lux index a083d8f53..37a5a0f40 100644 --- a/stdlib/source/program/aedifex/command/deploy.lux +++ b/stdlib/source/program/aedifex/command/deploy.lux @@ -44,5 +44,6 @@ _ (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)))] + _ (deploy! ///artifact/extension.md5 (///hash.data (///hash.md5 library))) + #let [_ (log! "Successfully deployed!")]] (wrap [])))) diff --git a/stdlib/source/program/aedifex/command/deps.lux b/stdlib/source/program/aedifex/command/deps.lux new file mode 100644 index 000000000..91bbf0ec1 --- /dev/null +++ b/stdlib/source/program/aedifex/command/deps.lux @@ -0,0 +1,37 @@ +(.module: + [lux #* + [abstract + [monad (#+ do)]] + [control + [concurrency + ["." promise]]] + [data + [collection + ["." set (#+ Set)] + ["." list ("#\." functor)]]] + [world + ["." file]]] + ["." /// #_ + [command (#+ Command)] + [artifact (#+ Artifact)] + ["#" profile] + ["#." action (#+ Action)] + ["#." cache] + ["#." repository] + ["#." dependency #_ + ["#" resolution]]]) + +(def: #export (do! profile) + (Command (Set Artifact)) + (do ///action.monad + [cache (///cache.read-all (file.async file.default) + (set.to-list (get@ #///.dependencies profile)) + ///dependency.empty) + resolution (///dependency.all (list\map (|>> ///repository.remote ///repository.async) + (set.to-list (get@ #///.repositories profile))) + (set.to-list (get@ #///.dependencies profile)) + cache) + cached (///cache.write-all (file.async file.default) + resolution) + #let [_ (log! "Successfully resolved dependencies!")]] + (wrap cached))) |