diff options
author | Eduardo Julian | 2020-12-10 22:29:32 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-12-10 22:29:32 -0400 |
commit | 9af671a34728b35c48bff2ba163c371dc5084946 (patch) | |
tree | ec35f32b8f0cabec702708e0e3cc4462b587c752 /stdlib/source/program/aedifex/command/install.lux | |
parent | d747aada2d6df6538d0a88d70169f3757aef50af (diff) |
Render XML to text in an indented form for human readability.
Diffstat (limited to 'stdlib/source/program/aedifex/command/install.lux')
-rw-r--r-- | stdlib/source/program/aedifex/command/install.lux | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/stdlib/source/program/aedifex/command/install.lux b/stdlib/source/program/aedifex/command/install.lux index 327a0c119..d11d96a0c 100644 --- a/stdlib/source/program/aedifex/command/install.lux +++ b/stdlib/source/program/aedifex/command/install.lux @@ -21,6 +21,7 @@ ["." tar] ["." xml]]] [world + [program (#+ Program)] ["." file (#+ Path File)] ["." console (#+ Console)]]] [program @@ -47,21 +48,23 @@ (def: #export failure "Failure: No 'identity' defined for the project.") -(def: #export (do! console system profile) - (-> (Console Promise) (file.System Promise) (Command Any)) +(def: #export (do! program console system profile) + (-> (Program Promise) (Console Promise) (file.System Promise) (Command Any)) (case (get@ #/.identity profile) (#.Some identity) - (do ///action.monad - [package (export.library system (set.to-list (get@ #/.sources profile))) - repository (: (Promise (Try Path)) - (file.make-directories promise.monad system (///local.path system identity))) - #let [artifact-name (format repository (\ system separator) (///artifact.identity identity))] - _ (..save! system (binary.run tar.writer package) - (format artifact-name ///artifact/extension.lux-library)) - pom (\ promise.monad wrap (///pom.write profile)) - _ (..save! system (|> pom (\ xml.codec encode) encoding.to-utf8) - (format artifact-name ///artifact/extension.pom))] - (console.write-line //clean.success console)) + (do promise.monad + [home (\ program home [])] + (do ///action.monad + [package (export.library system (set.to-list (get@ #/.sources profile))) + repository (: (Promise (Try Path)) + (file.make-directories promise.monad system (///local.path system home identity))) + #let [artifact-name (format repository (\ system separator) (///artifact.identity identity))] + _ (..save! system (binary.run tar.writer package) + (format artifact-name ///artifact/extension.lux-library)) + pom (\ promise.monad wrap (///pom.write profile)) + _ (..save! system (|> pom (\ xml.codec encode) encoding.to-utf8) + (format artifact-name ///artifact/extension.pom))] + (console.write-line //clean.success console))) _ (console.write-line ..failure console))) |