Skip to content

Commit

Permalink
make module override in subcommands a flag
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolubbe committed Jul 24, 2024
1 parent 26df3aa commit 12e6e47
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/k16/kl/commands/containers.clj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
:description "Select containers to run"

:opts [{:option "module"
:short 0
:short "m"
:type :string}]

:runs (fn [props]
Expand All @@ -43,7 +43,7 @@
:description "Select containers to run"

:opts [{:option "module"
:short 0
:short "m"
:type :string}]

:runs (fn [props]
Expand Down Expand Up @@ -90,7 +90,7 @@
:description "Stop all running containers "

:opts [{:option "module"
:short 0
:short "m"
:type :string}]

:runs (fn [props]
Expand Down
3 changes: 2 additions & 1 deletion src/k16/kl/commands/endpoints.clj
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@
:description "List all endpoints"

:opts [{:option "module"
:short 0
:short "m"
:type :string}

{:option "service"
:short 0
:type :string}]

:runs list-endpoints}]})
6 changes: 4 additions & 2 deletions src/k16/kl/commands/modules.clj
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@
:description "Pull down changes to a module"

:opts [{:option "module"
:short 0
:short "m"
:type :string}

{:option "update"
:default false
:short 0
:type :with-flag}]

:runs pull!}
Expand All @@ -46,11 +47,12 @@
:description "Resolve the latest sha's of a module. This is the same as `pull --update`"

:opts [{:option "module"
:short 0
:short "m"
:type :string}

{:option "force"
:default false
:short 0
:type :with-flag}]

:runs (fn [props]
Expand Down
4 changes: 2 additions & 2 deletions src/k16/kl/commands/routes.clj
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
:description "List all routes"

:opts [{:option "module"
:short 0
:short "m"
:type :string}

{:option "output"
Expand All @@ -105,7 +105,7 @@
:description "Apply any route changes"

:opts [{:option "module"
:short 0
:short "m"
:type :string}]

:runs apply-routes!}]})
8 changes: 4 additions & 4 deletions src/k16/kl/commands/services.clj
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
:description "List all services"

:opts [{:option "module"
:short 0
:short "m"
:type :string}]

:runs list-services}
Expand All @@ -86,13 +86,13 @@
:description "Set the default endpoint for a service"

:opts [{:option "module"
:short 0
:short "m"
:type :string}
{:option "service"
:short 1
:short 0
:type :string}
{:option "endpoint"
:short 2
:short 1
:type :string}]

:runs set-default-service-endpoint!}]})

0 comments on commit 12e6e47

Please sign in to comment.