aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/program/aedifex')
-rw-r--r--stdlib/source/program/aedifex/command/pom.lux35
1 files changed, 35 insertions, 0 deletions
diff --git a/stdlib/source/program/aedifex/command/pom.lux b/stdlib/source/program/aedifex/command/pom.lux
new file mode 100644
index 000000000..f493092a5
--- /dev/null
+++ b/stdlib/source/program/aedifex/command/pom.lux
@@ -0,0 +1,35 @@
+(.module:
+ [lux #*
+ [abstract
+ [monad (#+ do)]]
+ [control
+ ["." try (#+ Try)]
+ [security
+ ["!" capability]]
+ [concurrency
+ ["." promise (#+ Promise) ("#@." monad)]]]
+ [data
+ ["." text
+ ["%" format (#+ format)]
+ ["." encoding]]
+ [format
+ ["." xml]]]
+ [world
+ ["." file (#+ Path File)]]]
+ ["." /// #_
+ [command (#+ Command)]
+ ["#." action (#+ Action)]
+ ["#." pom]])
+
+(def: #export (do! fs profile)
+ (-> (file.System Promise) (Command Path))
+ (do ///action.monad
+ [pom (promise@wrap (///pom.write profile))
+ file (: (Promise (Try (File Promise)))
+ (file.get-file promise.monad fs ///pom.file))
+ outcome (|> pom
+ (:: xml.codec encode)
+ encoding.to-utf8
+ (!.use (:: file over-write)))
+ #let [_ (log! "Successfully wrote POM file!")]]
+ (wrap ///pom.file)))