monoz 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +21 -1
- data/lib/monoz/application.rb +0 -1
- data/lib/monoz/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a32f7cab2b3497cd922ecf25d69b22e38691000b3c159252cc2a858c7dc4e722
|
4
|
+
data.tar.gz: 41018578262df7e5d4af4889806bff2450923826a51fb43281ad180df330234b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26684e62c8a7cca445ab9a6b8e2720a5a662147ab2017e09ffc9fa51fdf8aaa20be1f4a0d62fcd5e5fee310b472cc885dd6fe2f37221bc54579fa287cf497455
|
7
|
+
data.tar.gz: 42dd417d6955edf51163a2430ec82621ab1cff11e530f7f9f020de54b546e1a831dc11a7a6849038010b048882f06e8359e566374fa40fb0849ddbdcdba44dcf
|
data/README.md
CHANGED
@@ -172,7 +172,27 @@ example_com: bin/dev
|
|
172
172
|
23:41:06 css.1 | Done in 354ms.
|
173
173
|
```
|
174
174
|
|
175
|
-
|
175
|
+
## Actions
|
176
|
+
You can add custom actions to the `monoz.yml` file in the root directory of your project. Each action can be executed by running `monoz [ACTION]` on the command line.
|
177
|
+
|
178
|
+
To define a new action, add a new key under the actions section in the `monoz.yml` file. The key should be the name of the action, and its value should be a list of tasks to be executed.
|
179
|
+
|
180
|
+
Each task should have two keys: `in` and `run`. The `in` key specifies the projects in which the task should be executed. You can use the same filter syntax as when passing filters to the `--filter` option. The `run` key specifies the command to be executed.
|
181
|
+
|
182
|
+
Here's an example of a custom action that runs database migrations in all `apps`:
|
183
|
+
|
184
|
+
```yaml
|
185
|
+
actions:
|
186
|
+
migrate:
|
187
|
+
- in: apps
|
188
|
+
run: bin/rails db:migrate
|
189
|
+
```
|
190
|
+
|
191
|
+
To execute this action, simply run `monoz migrate` on the command line. This will run the `bin/rails db:migrate` command in all projects tagged as apps.
|
192
|
+
|
193
|
+
You can add as many custom actions as you like. Just make sure to follow the same format as in the example above.
|
194
|
+
|
195
|
+
## Filters
|
176
196
|
|
177
197
|
The `--filter` option in Monoz allows you to select certain projects based on specific criteria. This is useful if you only want to run a command on a specific subset of projects, rather than all of them. To use the `--filter` option, you simply specify a filter expression after the option. The filter expression is a comma-separated list of keywords that match the project names or tags in your Monoz configuration.
|
178
198
|
|
data/lib/monoz/application.rb
CHANGED
@@ -24,7 +24,6 @@ module Monoz
|
|
24
24
|
return help("bundle") if command.nil? || command.first == "help"
|
25
25
|
|
26
26
|
projects = Monoz.projects.order(:dependants)
|
27
|
-
Monoz::Services::BundleService.new(self).link_local_gems!(projects)
|
28
27
|
Monoz::Services::RunService.new(self).call(projects, "bundle", *command)
|
29
28
|
|
30
29
|
say "The command ran successfully in all project directories without any errors.", [:green]
|
data/lib/monoz/version.rb
CHANGED