Class: Kdep::Doctor::CheckStateTagFormat
- Defined in:
- lib/kdep/doctor/check_state_tag_format.rb
Constant Summary collapse
- ID =
"state_tag_format".freeze
Instance Attribute Summary
Attributes inherited from Check
Instance Method Summary collapse
Methods inherited from Check
Constructor Details
This class inherits a constructor from Kdep::Doctor::Check
Instance Method Details
#run ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/kdep/doctor/check_state_tag_format.rb', line 8 def run return Result.ok(ID) unless Kdep::State.exists?(deploy_dir) tag = Kdep::State.tag(deploy_dir) return Result.ok(ID) if Kdep::State.parseable_tag?(tag) Result.new( id: ID, severity: :warn, message: "state.yml tag #{tag.inspect} is not kdep's major.minor format", hint: "Next 'kdep bump' will fall back to 0.1 for this deploy." ) end |