(.module: [library [lux #* [abstract [monad (#+ do)]] [control [pipe (#+ do>)] ["." try (#+ Try)] [concurrency ["." async (#+ Async) ("#\." monad)]] ["<>" parser ["<.>" xml]]] [data [binary (#+ Binary)] [text ["%" format (#+ format)] [encoding ["." utf8]]] [collection ["." set]] [format ["." binary] ["." tar] ["." xml]]] [time ["." instant (#+ Instant)]] [world ["." file] ["." console (#+ Console)]]]] [program [compositor ["." export]]] ["." // #_ ["#." clean] ["/#" // #_ [command (#+ Command)] ["/" profile] ["#." action (#+ Action)] ["#." pom] ["#." hash] ["#." package] ["#." dependency ["#/." deployment] ["#/." status (#+ Status)]] ["#." repository (#+ Repository) [identity (#+ Identity)] ["#/." remote] ["#/." origin]] ["#." metadata ["#/." artifact] ["#/." snapshot]] ["#." artifact (#+ Artifact) ["#/." extension (#+ Extension)] ["#/." type]]]]) (def: .public success "Successfully deployed the project.") (def: .public (do! console repository fs artifact profile) (-> (Console Async) (Repository Async) (file.System Async) Artifact (Command Any)) (do {! ///action.monad} [library (|> profile (value@ #/.sources) set.list (export.library fs) (\ ! map (binary.result tar.writer))) pom (\ async.monad in (///pom.write profile)) _ (///dependency/deployment.one repository [artifact ///artifact/type.lux_library] (let [pom_data (|> pom (\ xml.codec encode) (\ utf8.codec encode))] {#///package.origin (#///repository/origin.Remote "") #///package.library [library (///dependency/status.verified library)] #///package.pom [pom pom_data (///dependency/status.verified pom_data)]}))] (console.write_line ..success console)))