Skip to content

Commit

Permalink
Improve getting code name
Browse files Browse the repository at this point in the history
  • Loading branch information
abetomo committed Oct 8, 2024
1 parent 35a1af9 commit 675a570
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions update-tag-list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
}

def debian_code_name(type_path)
file = File.open("#{type_path}/Dockerfile")
code_name = file.readline.chomp.split('-').pop.capitalize
file.close
code_name
File.readlines("#{type_path}/Dockerfile", chomp: true).first.split("-").last.capitalize
end

type_paths = []
Expand Down Expand Up @@ -44,7 +41,7 @@ def debian_code_name(type_path)
type = type_path.gsub("/", "-")
distribution_id, postgresql_version, = type.split("-")
distribution = distribution_labels[distribution_id]
distribution += " " + debian_code_name(type_path) if distribution_id == "debian"
distribution += " #{debian_code_name(type_path)}" if distribution_id == "debian"

components[1] = " %-#*s " % [pgroonga_version_width, pgroonga_version]

Expand Down

0 comments on commit 675a570

Please sign in to comment.