Class: Afterlife::Propagate::Cli
- Inherits:
-
Thor
- Object
- Thor
- Afterlife::Propagate::Cli
show all
- Includes:
- BaseCli
- Defined in:
- lib/afterlife/propagate/cli.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from BaseCli
#fatal!, #log_error, #log_info, #log_interrupted, #log_success, #sure?
Class Method Details
.exit_on_failure? ⇒ Boolean
7
8
9
|
# File 'lib/afterlife/propagate/cli.rb', line 7
def self.exit_on_failure?
true
end
|
Instance Method Details
#propagate_qa_to_sandbox ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/afterlife/propagate/cli.rb', line 14
def propagate_qa_to_sandbox
confirmation_message = " This command will perform the following actions:\n\n 1. Fetch the latest changes from origin/qa\n 2. Switch to the sandbox branch\n 3. Reset sandbox branch to match origin/qa exactly\n 4. Force push the changes to origin/sandbox\n 5. Return to your original branch\n\n This operation will completely overwrite the sandbox branch with the current state of QA.\n Are you sure you want to proceed?\n MSG\n\n sure?(confirmation_message) unless options[:yes]\n\n PropagateQaToSandbox.call\nrescue StandardError => e\n fatal!(e.message)\nrescue Interrupt\n log_interrupted\nend\n"
|