Skip to content

Commit

Permalink
Fix dependency check with modules that use a leading v in the version…
Browse files Browse the repository at this point in the history
… tags
  • Loading branch information
ZeroPointEnergy committed Jun 3, 2019
1 parent d8cb209 commit 868f69c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ra10ke/dependencies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ def define_task_dependencies(*_args)
tags = remote_refs['tags'].keys
latest_tag = tags.map do |tag|
begin
Semverse::Version.new tag
Semverse::Version.new tag[/\Av?(.*)\Z/, 1]
rescue Semverse::InvalidVersionFormat
# ignore tags that do not comply to semver
nil
end
end.select { |tag| !tag.nil? }.sort.last.to_s.downcase
latest_ref = tags.detect { |tag| [tag.downcase, "v#{tag.downcase}"].include?(latest_tag) }
latest_ref = tags.detect { |tag| tag[/\Av?(.*)\Z/, 1] == latest_tag }
latest_ref = 'undef (tags do not match semantic versioning)' if latest_ref.nil?
elsif ref.match(/^[a-z0-9]{40}$/)
# for sha just assume head should be tracked
Expand Down

0 comments on commit 868f69c

Please sign in to comment.