aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/command/deploy
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/program/aedifex/command/deploy.lux77
-rw-r--r--stdlib/source/program/aedifex/command/deploy/snapshot.lux61
2 files changed, 75 insertions, 63 deletions
diff --git a/stdlib/source/program/aedifex/command/deploy.lux b/stdlib/source/program/aedifex/command/deploy.lux
index 6fcd84e21..4ff3b9011 100644
--- a/stdlib/source/program/aedifex/command/deploy.lux
+++ b/stdlib/source/program/aedifex/command/deploy.lux
@@ -4,78 +4,29 @@
[abstract
[monad {"+" do}]]
[control
- ["[0]" try {"+" Try}]
+ [try {"+" Try}]
[concurrency
- ["[0]" async {"+" Async} ("[1]#[0]" monad)]]
- ["<>" parser
- ["<[0]>" xml]]]
- [data
- [binary {"+" Binary}]
- [text
- ["%" format {"+" format}]
- [encoding
- ["[0]" utf8]]]
- [collection
- ["[0]" set]]
- [format
- ["[0]" binary]
- ["[0]" tar]
- ["[0]" xml]]]
- [time
- ["[0]" instant {"+" Instant}]]
- [tool
- [compiler
- [meta
- ["[0]" export]]]]
+ [async {"+" Async}]]]
[world
["[0]" file]
["[0]" console {"+" Console}]]]]
- ["[0]" // "_"
- ["[1][0]" clean]
+ ["[0]" / "_"
+ ["[1][0]" snapshot]
["/[1]" // "_"
- [command {"+" Command}]
- ["/" profile]
- ["[1][0]" action {"+" Action}]
- ["[1][0]" pom]
- ["[1][0]" hash]
- ["[1][0]" package]
- ["[1][0]" dependency
- ["[1]/[0]" deployment]
- ["[1]/[0]" status {"+" Status}]]
- ["[1][0]" repository {"+" Repository}
- [identity {"+" Identity}]
- ["[1]/[0]" remote]
- ["[1]/[0]" origin]]
- ["[1][0]" metadata
- ["[1]/[0]" artifact]
- ["[1]/[0]" snapshot]]
- ["[1][0]" artifact {"+" Artifact}
- ["[1]/[0]" extension {"+" Extension}]
- ["[1]/[0]" type]]]])
+ ["[1][0]" install]
+ ["/[1]" // "_"
+ [command {"+" Command}]
+ [repository {"+" Repository}]
+ [artifact {"+" Artifact}]
+ ["[1][0]" action]]]])
(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))
+(def: .public (do! console local remote fs artifact profile)
+ (-> (Console Async) (Repository Async) (Repository Async) (file.System Async) Artifact (Command Any))
(do [! ///action.monad]
- [library (|> profile
- (the /.#sources)
- set.list
- (export.library fs)
- (# ! each (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 encoded)
- (# utf8.codec encoded))]
- [///package.#origin {///repository/origin.#Remote ""}
- ///package.#library [library
- (///dependency/status.verified library)]
- ///package.#pom [pom
- pom_data
- (///dependency/status.verified pom_data)]]))]
+ [_ (//install.do! console fs local profile)
+ _ (/snapshot.do! console remote fs artifact profile)]
(is (Async (Try Any))
(console.write_line ..success console))))
diff --git a/stdlib/source/program/aedifex/command/deploy/snapshot.lux b/stdlib/source/program/aedifex/command/deploy/snapshot.lux
new file mode 100644
index 000000000..9770965d9
--- /dev/null
+++ b/stdlib/source/program/aedifex/command/deploy/snapshot.lux
@@ -0,0 +1,61 @@
+(.using
+ [library
+ [lux "*"
+ [abstract
+ [monad {"+" do}]]
+ [control
+ [concurrency
+ ["[0]" async {"+" Async}]]]
+ [data
+ [text
+ [encoding
+ ["[0]" utf8]]]
+ [collection
+ ["[0]" set]]
+ [format
+ ["[0]" binary]
+ ["[0]" tar]
+ ["[0]" xml]]]
+ [tool
+ [compiler
+ [meta
+ ["[0]" export]]]]
+ [world
+ [console {"+" Console}]
+ ["[0]" file]]]]
+ ["[0]" //// "_"
+ [command {"+" Command}]
+ ["/" profile]
+ ["[1][0]" action]
+ ["[1][0]" pom]
+ ["[1][0]" package]
+ ["[1][0]" dependency "_"
+ ["[1]/[0]" deployment]
+ ["[1]/[0]" status]]
+ ["[1][0]" repository {"+" Repository}
+ ["[1]/[0]" origin]]
+ ["[1][0]" artifact {"+" Artifact}
+ ["[1]/[0]" type]]])
+
+(def: .public (do! console remote fs artifact profile)
+ (-> (Console Async) (Repository Async) (file.System Async) Artifact (Command Any))
+ (do [! ////action.monad]
+ [library (|> profile
+ (the /.#sources)
+ set.list
+ (export.library fs)
+ (# ! each (binary.result tar.writer)))
+ pom (# async.monad in (////pom.write profile))
+ _ (////dependency/deployment.one
+ remote
+ [artifact ////artifact/type.lux_library]
+ (let [pom_data (|> pom
+ (# xml.codec encoded)
+ (# utf8.codec encoded))]
+ [////package.#origin {////repository/origin.#Remote ""}
+ ////package.#library [library
+ (////dependency/status.verified library)]
+ ////package.#pom [pom
+ pom_data
+ (////dependency/status.verified pom_data)]]))]
+ (in [])))