From e5e4c2aff562e5c01fefb808d1d68a40f29c9cc5 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 8 Apr 2022 01:49:29 -0400 Subject: Can now deploy releases with Aedifex. --- stdlib/source/program/aedifex/pom.lux | 91 ++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 44 deletions(-) (limited to 'stdlib/source/program/aedifex/pom.lux') diff --git a/stdlib/source/program/aedifex/pom.lux b/stdlib/source/program/aedifex/pom.lux index 8b4e8e0ed..683e1bb6d 100644 --- a/stdlib/source/program/aedifex/pom.lux +++ b/stdlib/source/program/aedifex/pom.lux @@ -94,52 +94,51 @@ (-> Text (-> (List XML) XML)) (|>> {_.#Node ["" tag] _.attributes})) -(comment - (def: scm - (-> /.SCM XML) - (|>> (..property ..url_tag) - list - {_.#Node ["" "scm"] _.attributes})) - - (def: (organization [name url]) - (-> /.Organization XML) - (|> (list (..property "name" name) - (..property ..url_tag url)) - {_.#Node ["" "organization"] _.attributes})) - - (def: (developer_organization [name url]) - (-> /.Organization (List XML)) - (list (..property "organization" name) - (..property "organizationUrl" url))) - - (def: (developer' [name email organization]) - (-> /.Developer (List XML)) - (partial_list (..property "name" name) - (..property "email" email) - (|> organization (maybe#each ..developer_organization) (maybe.else (list))))) - - (template [ ] - [(def: - (-> XML) - (|>> ..developer' {_.#Node ["" ] _.attributes}))] - - [developer /.Developer "developer"] - [contributor /.Contributor "contributor"] - ) - - (def: (info value) - (-> /.Info (List XML)) - ($_ list#composite - (|> value (the /.#url) (maybe#each (..property ..url_tag)) maybe.list) - (|> value (the /.#description) (maybe#each (..property "description")) maybe.list) - (|> value (the /.#licenses) (list#each ..license) (..group "licenses") list) - (|> value (the /.#scm) (maybe#each ..scm) maybe.list) - (|> value (the /.#organization) (maybe#each ..organization) maybe.list) - (|> value (the /.#developers) (list#each ..developer) (..group "developers") list) - (|> value (the /.#contributors) (list#each ..contributor) (..group "contributors") list) - )) +(def: scm + (-> /.SCM XML) + (|>> (..property ..url_tag) + list + {_.#Node ["" "scm"] _.attributes})) + +(def: (organization [name url]) + (-> /.Organization XML) + (|> (list (..property "name" name) + (..property ..url_tag url)) + {_.#Node ["" "organization"] _.attributes})) + +(def: (developer_organization [name url]) + (-> /.Organization (List XML)) + (list (..property "organization" name) + (..property "organizationUrl" url))) + +(def: (developer' [name email organization]) + (-> /.Developer (List XML)) + (partial_list (..property "name" name) + (..property "email" email) + (|> organization (maybe#each ..developer_organization) (maybe.else (list))))) + +(template [ ] + [(def: + (-> XML) + (|>> ..developer' {_.#Node ["" ] _.attributes}))] + + [developer /.Developer "developer"] + [contributor /.Contributor "contributor"] ) +(def: (info value) + (-> /.Info (List XML)) + ($_ list#composite + (|> value (the /.#name) (maybe#each (..property "name")) maybe.list) + (|> value (the /.#url) (maybe#each (..property ..url_tag)) maybe.list) + (|> value (the /.#description) (maybe#each (..property "description")) maybe.list) + (|> value (the /.#licenses) (list#each ..license) (..group "licenses") list) + (|> value (the /.#scm) (maybe#each ..scm) maybe.list) + (|> value (the /.#organization) (maybe#each ..organization) maybe.list) + (|> value (the /.#developers) (list#each ..developer) (..group "developers") list) + (|> value (the /.#contributors) (list#each ..contributor) (..group "contributors") list) + )) + (def: .public (write value) (-> /.Profile (Try XML)) (case (the /.#identity value) @@ -149,6 +148,10 @@ ($_ list#composite (list ..version) (..artifact identity) + (|> value + (the /.#info) + (maybe#each ..info) + (maybe.else (list))) (|> value (the /.#repositories) set.list (list#each ..repository) (..group "repositories") list) (|> value (the /.#dependencies) set.list (list#each ..dependency) (..group ..dependencies_tag) list) )}} -- cgit v1.2.3