Skip to content

Commit

Permalink
Update core_data_generator.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
joshcampbell191 committed Dec 8, 2022
1 parent ed5c97b commit ed9c9ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/core_data_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 164,7 @@ def build_json(release_type, repo_metadata)

# TODO: Handle multiple platform_ids. No cores currently do this.
platform_id = core_metadata["platform_ids"].first
platform_json = parse_json_file("#{platform_id}.json", "Platforms")["platform"]
platform_json = parse_json_file("#{platform_id}.json", "[Pp]latforms")["platform"]

json = {
"repository" => repository,
Expand Down Expand Up @@ -238,7 238,7 @@ def build_asset_json(platform)
end

def parse_json_file(file_name, subdirectory = "Cores")
file_path = Dir.glob("#{@directory}/#{subdirectory}/**/#{file_name}", File::FNM_CASEFOLD).first
file_path = Dir.glob("#{@directory}/#{subdirectory}/**/#{file_name}").first

# If the file doesn't exist, the directory is not a core.
return unless file_path
Expand Down

0 comments on commit ed9c9ba

Please sign in to comment.