From 2d16bdfa2854d851034eff9f042863dcceb8664a Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 3 Oct 2020 20:13:27 -0400 Subject: Gave Aedifex support for multiple profiles. --- stdlib/source/program/aedifex/cli.lux | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'stdlib/source/program/aedifex/cli.lux') diff --git a/stdlib/source/program/aedifex/cli.lux b/stdlib/source/program/aedifex/cli.lux index b0d210c17..dc64dee6e 100644 --- a/stdlib/source/program/aedifex/cli.lux +++ b/stdlib/source/program/aedifex/cli.lux @@ -1,10 +1,11 @@ (.module: - [lux #* + [lux (#- Name) [control ["<>" parser ["." cli (#+ Parser)]]]] [// - [upload (#+ User Password)]]) + [upload (#+ User Password)] + ["/" profile (#+ Name)]]) (type: #export Compilation #Build @@ -15,7 +16,7 @@ (<>.or (cli.this "build") (cli.this "test"))) -(type: #export Command +(type: #export Operation #POM #Dependencies #Install @@ -23,8 +24,11 @@ (#Compilation Compilation) (#Auto Compilation)) -(def: #export command - (Parser Command) +(type: #export Command + [Name Operation]) + +(def: operation + (Parser Operation) ($_ <>.or (cli.this "pom") (cli.this "deps") @@ -38,3 +42,14 @@ (<>.after (cli.this "auto") ..compilation) )) + +(def: #export command + (Parser Command) + ($_ <>.either + (<>.after (cli.this "with") + ($_ <>.and + cli.any + ..operation)) + (:: <>.monad map (|>> [/.default]) + ..operation) + )) -- cgit v1.2.3