Skip to content

Commit

Permalink
Fix version handling
Browse files Browse the repository at this point in the history
  • Loading branch information
flash-gordon committed Aug 27, 2023
1 parent 3698f6b commit a67ffac
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,14 @@ def github_url
end

def current_branch
versions[:branch]
current_project.versions.find { |version| version[:value] == current_version }[:branch]
end

def versions
@versions ||=
begin
vs = current_project.versions.find { |version| version[:value] == current_version }.sort_by { |version|
vs = current_project.versions.sort_by { |v|
version = v[:value]
if version.match?(/[\d\.]+/)
[1, *version.split('.').map(&:to_i)]
else
Expand Down Expand Up @@ -325,7 +326,7 @@ def gem_name
end

def set_version(url, new_version)
return url unless versions.empty?
return url unless current_project.versions.empty?

version = extract_version(url)

Expand Down

0 comments on commit a67ffac

Please sign in to comment.