Class: KCommercial::KCPipeline::Command::CheckReleaseCMD
- Inherits:
-
KCommercial::KCPipeline::Command
- Object
- CLAide::Command
- KCommercial::KCPipeline::Command
- KCommercial::KCPipeline::Command::CheckReleaseCMD
- Defined in:
- lib/KCommercialPipeline/command/check_release_cmd.rb
Instance Attribute Summary collapse
-
#branch_name ⇒ Object
readonly
Returns the value of attribute branch_name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ CheckReleaseCMD
constructor
A new instance of CheckReleaseCMD.
- #run ⇒ Object
Methods inherited from KCommercial::KCPipeline::Command
Constructor Details
#initialize(argv) ⇒ CheckReleaseCMD
Returns a new instance of CheckReleaseCMD.
18 19 20 21 |
# File 'lib/KCommercialPipeline/command/check_release_cmd.rb', line 18 def initialize(argv) @branch_name = argv.option('branch_name') || "" super end |
Instance Attribute Details
#branch_name ⇒ Object (readonly)
Returns the value of attribute branch_name.
8 9 10 |
# File 'lib/KCommercialPipeline/command/check_release_cmd.rb', line 8 def branch_name @branch_name end |
Class Method Details
.options ⇒ Object
12 13 14 15 16 |
# File 'lib/KCommercialPipeline/command/check_release_cmd.rb', line 12 def self. [ %w[--branch_name 需要校验的release分支,选填], ].concat(super ) end |
Instance Method Details
#run ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/KCommercialPipeline/command/check_release_cmd.rb', line 23 def run if @branch_name.nil? || @branch_name.empty? ReleaseCheck.new().check_all else ReleaseChecker.new(@branch_name).run! end end |