lib/new-releases-detector.rb
# take the list of tags and format the version so it matches
# the version in the buildpack manifest.yml. This way, the version format
# is consistent throughout the whole pipeline.
take the list of tags and format the version so it matches
the version in the buildpack manifest.yml. This way, the version format
is consistent throughout the whole pipeline.
take the list of tags and format the version so it matches the version in the buildpack manifest . yml . This way the version format is consistent throughout the whole pipeline .
def massage_version(tags,dependency)
    case dependency
    when :miniconda
      versions_if_found = tags.map do |link|
        match = link.match(/-((?<ver>\d+\.\d+\.\d+))-Linux-x86_64/)
        match['ver'] unless match.nil?
      end
      versions_if_found.compact.uniq.sort
    when :newrelic
      versions_if_found = tags.map do |link|
        match = link.match(/((?<ver>\d+\.\d+\.\d+\.\d+))/)
        match['ver'] unless match.nil?
      end
      versions_if_found.compact.uniq.sort
    when :bundler
      tags.map { |tag| tag.gsub(/v/,"")}
    when :node
      tags.map { |tag| tag.gsub(/v/,"")}
    when :nginx
      tags.map { |tag| tag.gsub('release-', '')}
    when :yarn
      tags.map { |tag| tag.gsub(/v/,"")}
    else
      tags
    end
  end
def massage_version ( tags , dependency ) case dependency when :miniconda versions_if_found = tags . map do | link | match = link . match ( / -((?<ver> \d + \. \d + \. \d +))-Linux-x86_64 / ) match [ 'ver' ] unless match . nil? end versions_if_found . compact . uniq . sort when :newrelic versions_if_found = tags . map do | link | match = link . match ( / ((?<ver> \d + \. \d + \. \d + \. \d +)) / ) match [ 'ver' ] unless match . nil? end versions_if_found . compact . uniq . sort when :bundler tags . map { | tag | tag . gsub ( / v / , "" ) } when :node tags . map { | tag | tag . gsub ( / v / , "" ) } when :nginx tags . map { | tag | tag . gsub ( 'release-' , '' ) } when :yarn tags . map { | tag | tag . gsub ( / v / , "" ) } else tags end end
take the list of tags and format the version so it matches
the version in the buildpack manifest.yml.
take the list of tags and format the version so it matches the version in the buildpack manifest . yml .
tags
dependency