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
8
9
10
|
# File 'lib/afterlife/propagate/cli.rb', line 8
def self.exit_on_failure?
true
end
|
Instance Method Details
#propagate_qa_to_sandbox ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/afterlife/propagate/cli.rb', line 15
def propagate_qa_to_sandbox
confirmation_message = <<~MSG
This command will perform the following actions:
1. Fetch the latest changes from origin/qa
2. Switch to the sandbox branch
3. Reset sandbox branch to match origin/qa exactly
4. Force push the changes to origin/sandbox
5. Return to your original branch
This operation will completely overwrite the sandbox branch with the current state of QA.
Are you sure you want to proceed?
MSG
sure?(confirmation_message) unless options[:yes]
PropagateQaToSandbox.call
rescue StandardError => e
fatal!(e.message)
rescue Interrupt
log_interrupted
end
|