Skip to content
Snippets Groups Projects
Commit 6099a70b authored by DJ Mountney's avatar DJ Mountney
Browse files

Merge branch 'fix-ordering-of-license-page' into 'master'

Fix wrong order of versions in License page

See merge request gitlab-org/omnibus-gitlab!5229
parents 8c0a612d 38783b0f
No related branches found
No related tags found
2 merge requests!51Validate shift of Heptapod 0.25 to oldstable series,!41GitLab 13.12
......@@ -16,7 +16,7 @@
<div class="col-md-6">
<h2><%= edition %></h2>
<table class="table table-bordered">
<% Dir.glob(File.join(@licenses_path, slug, "*")).sort.reverse.each do |minor_version| %>
<% Dir.glob(File.join(@licenses_path, slug, "*")).sort_by { |version_path| Gem::Version.new(File.basename(version_path)) }.reverse.each do |minor_version| %>
<tr class="header clickable">
<td class="deps"><h3><%= File.basename(minor_version) %></h3></td>
</tr>
......@@ -20,7 +20,7 @@
<tr class="header clickable">
<td class="deps"><h3><%= File.basename(minor_version) %></h3></td>
</tr>
<% Dir.glob(File.join(minor_version, "*html")).sort.reverse.each do |license_file| %>
<% Dir.glob(File.join(minor_version, "*html")).sort_by { |version_path| Gem::Version.new(File.basename(version_path).gsub(/-(ce|ee).*$/, "")) }.reverse.each do |license_file| %>
<% url = "#{slug}/#{File.basename(minor_version)}/#{File.basename(license_file).gsub('+', '%2B')}" %>
<% title = File.basename(license_file).gsub(".html", "") %>
<tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment