diff --git a/update-tag-list.rb b/update-tag-list.rb index 5adf668..84793ff 100755 --- a/update-tag-list.rb +++ b/update-tag-list.rb @@ -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 = [] @@ -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]