1- defmodule Makina.Cli.Commands.Standalone do
1+ defmodule Makina.Cli.Commands.App do
22 @ behaviour Makina.Cli.Command
33
44 import Makina.Cli.Utils
@@ -8,26 +8,29 @@ defmodule Makina.Cli.Commands.Standalone do
88
99 @ sub_commands ~w[ deploy stop remove] a
1010
11- def name ( ) , do: "standalone "
11+ def name ( ) , do: "app "
1212
1313 def short_description ( ) ,
14- do: "Manage standalone applications defined in the Makinafile"
14+ do: "Manage applications defined in the Makinafile"
1515
1616 def help ,
1717 do: """
1818 Makina
19- Standalone applications management command
19+ Applications management command
2020
21- Manages all standalone applications found in the current Makinafile.
21+ Manages all applications found in the current Makinafile.
2222
2323 Usage:
24- makina standalone <SUB COMMAND> [OPTIONS]
24+ makina app <SUB COMMAND> [OPTIONS]
2525
2626 Sub-commands:
27- deploy Deploys all standalone applications defined in the Makinafile.
27+ deploy Deploys all applications defined in the Makinafile.
28+ stop Stops all applications.
29+ remove Removes containers of applications from servers.
2830
2931 Options:
30- * --file - The path to a Makinafile, if not provided the command will look for it in the current folder.
32+ * --app Specifies which app to apply the command to.
33+ * --file The path to a Makinafile, if not provided the command will look for it in the current folder.
3134 """
3235
3336 def exec ( arguments , options ) do
@@ -45,7 +48,7 @@ defmodule Makina.Cli.Commands.Standalone do
4548 |> fetch_context ( )
4649
4750 servers = ctx . servers
48- apps = filter_apps_from_options ( ctx . standalone_applications , options )
51+ apps = filter_apps_from_options ( ctx . applications , options )
4952 deployment_result = do_deploy ( servers , apps )
5053
5154 case deployment_errors? ( deployment_result ) do
@@ -67,7 +70,7 @@ defmodule Makina.Cli.Commands.Standalone do
6770 |> fetch_context ( )
6871
6972 servers = ctx . servers
70- apps = filter_apps_from_options ( ctx . standalone_applications , options )
73+ apps = filter_apps_from_options ( ctx . applications , options )
7174 deployment_result = do_stop ( servers , apps )
7275
7376 case deployment_errors? ( deployment_result ) do
@@ -89,7 +92,7 @@ defmodule Makina.Cli.Commands.Standalone do
8992 |> fetch_context ( )
9093
9194 servers = ctx . servers
92- apps = filter_apps_from_options ( ctx . standalone_applications , options )
95+ apps = filter_apps_from_options ( ctx . applications , options )
9396 deployment_result = do_remove ( servers , apps )
9497
9598 case deployment_errors? ( deployment_result ) do
@@ -118,7 +121,7 @@ defmodule Makina.Cli.Commands.Standalone do
118121 end
119122
120123 defp do_deploy ( servers , apps ) do
121- Applications . deploy_standalone_applications ( servers , apps )
124+ Applications . deploy_applications ( servers , apps )
122125 end
123126
124127 defp do_stop ( _servers , [ ] ) do
@@ -128,7 +131,7 @@ defmodule Makina.Cli.Commands.Standalone do
128131 end
129132
130133 defp do_stop ( servers , apps ) when is_list ( apps ) do
131- Applications . stop_standalone_applications ( servers , apps )
134+ Applications . stop_applications ( servers , apps )
132135 end
133136
134137 defp do_remove ( _servers , [ ] ) do
@@ -138,7 +141,7 @@ defmodule Makina.Cli.Commands.Standalone do
138141 end
139142
140143 defp do_remove ( servers , apps ) when is_list ( apps ) do
141- Applications . remove_standalone_applications ( servers , apps )
144+ Applications . remove_applications ( servers , apps )
142145 end
143146
144147 defp filter_apps_from_options ( apps , options ) do
0 commit comments