brut 0.19.1 → 0.19.2
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/lib/brut/cli/apps/deploy.rb +15 -5
- data/lib/brut/cli/commands/base_command.rb +4 -0
- data/lib/brut/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: 765659b6fbd1258a4b5615cfea8e7d273fbebd4336ceb6518367bc5ad329bcb8
|
|
4
|
+
data.tar.gz: 35777088ab7cc473a3ef5459087349846586798154e9f699e52b3b5be22c64db
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 946899aa325e088a414c88e63b6bd58c7278380e90929f886905b9cd100c2a98d672d570a036e0edf66953719dccb4b6bd1dd5525f885fcc2421ea82da142ece
|
|
7
|
+
data.tar.gz: 9bfe8cef4bd6e4effbca418ab446796fed352999f21b404d6904ec5ccd048bff9ed18de6f9fd47e8d45ad7045b73bf782375ca7bed13a1022d2af0e1e976bde5
|
data/lib/brut/cli/apps/deploy.rb
CHANGED
|
@@ -19,9 +19,14 @@ class Brut::CLI::Apps::Deploy < Brut::CLI::Commands::BaseCommand
|
|
|
19
19
|
def default_rack_env = "development"
|
|
20
20
|
|
|
21
21
|
def run
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
execute_result = Brut::CLI::ExecuteResult.new do
|
|
23
|
+
delegate_to_command(Brut::CLI::Apps::Deploy::Build.new)
|
|
24
|
+
end
|
|
25
|
+
if execute_result.failed?
|
|
26
|
+
puts theme.error.render("Build failed.")
|
|
27
|
+
return execute_result.exit_status do |error_message|
|
|
28
|
+
puts theme.error.render("Error message from build: #{error_message}")
|
|
29
|
+
end
|
|
25
30
|
end
|
|
26
31
|
options.set_default(:deploy, true)
|
|
27
32
|
version = ""
|
|
@@ -152,9 +157,14 @@ class Brut::CLI::Apps::Deploy < Brut::CLI::Commands::BaseCommand
|
|
|
152
157
|
|
|
153
158
|
def run
|
|
154
159
|
if !options.skip_checks?
|
|
155
|
-
|
|
160
|
+
execute_result = Brut::CLI::ExecuteResult.new do
|
|
161
|
+
delegate_to_command(Brut::CLI::Apps::Deploy::Check.new)
|
|
162
|
+
end
|
|
163
|
+
if execute_result.failed?
|
|
156
164
|
puts theme.error.render("Pre-build checks failed.")
|
|
157
|
-
return
|
|
165
|
+
return execute_result.exit_status do |error_message|
|
|
166
|
+
puts theme.error.render("Error message from checks: #{error_message}")
|
|
167
|
+
end
|
|
158
168
|
end
|
|
159
169
|
end
|
|
160
170
|
version = ""
|
|
@@ -19,6 +19,10 @@ class Brut::CLI::Commands::BaseCommand
|
|
|
19
19
|
self.run
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
+
# Delegates control to another command. This is most useful for aliasing one command
|
|
23
|
+
# to another. If you want to run another command as part of yoru command, you can use
|
|
24
|
+
# this, however you must use `Brut::CLI::ExecuteResult` to examine the return value, so you know if
|
|
25
|
+
# the command succeeded or not.
|
|
22
26
|
def delegate_to_command(command,execution_context=:use_ivar)
|
|
23
27
|
execution_context = if execution_context == :use_ivar
|
|
24
28
|
@execution_context
|
data/lib/brut/version.rb
CHANGED