matching_tags

in lib/release_tools/helm/helm_version_finder.rb [44:57]


      def matching_tags(tags, major, minor = nil, patch = nil)
        found = []

        tags.each do |tag, (tmajor, tminor, tpatch)|
          matches = major == tmajor
          matches &&= minor == tminor if minor
          matches &&= patch == tpatch if patch

          found.push(tag) if matches
        end

        found
      end