Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/features_parse/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ outputs:
runs:
using: composite
steps:
- uses: gardenlinux/python-gardenlinux-lib/.github/actions/setup@0.8.4
- uses: gardenlinux/python-gardenlinux-lib/.github/actions/setup@0.8.5
- id: result
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/flavors_parse/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ outputs:
runs:
using: composite
steps:
- uses: gardenlinux/python-gardenlinux-lib/.github/actions/setup@0.8.4
- uses: gardenlinux/python-gardenlinux-lib/.github/actions/setup@0.8.5
- id: matrix
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Installs the given GardenLinux Python library
inputs:
version:
description: GardenLinux Python library version
default: "0.8.4"
default: "0.8.5"
runs:
using: composite
steps:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "gardenlinux"
version = "0.8.4"
version = "0.8.5"
description = "Contains tools to work with the features directory of gardenlinux, for example deducting dependencies from feature sets or validating cnames"
authors = ["Garden Linux Maintainers <contact@gardenlinux.io>"]
license = "Apache-2.0"
Expand Down
8 changes: 4 additions & 4 deletions src/gardenlinux/oci/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def generate_metadata_from_file_name(file_name: PathLike | str, arch: str) -> di
@staticmethod
def lookup_media_type_for_file_name(file_name: str) -> str:
"""
Looks up the media type based on file extension.
Looks up the media type based on file name or extension.

:param file_name: File path and name of the target layer

Expand All @@ -170,9 +170,9 @@ def lookup_media_type_for_file_name(file_name: str) -> str:
if not isinstance(file_name, PathLike):
file_name = Path(file_name)

for suffix in GL_MEDIA_TYPES:
if file_name.match(f"*.{suffix}"):
return GL_MEDIA_TYPE_LOOKUP[suffix]
for lookup_name in GL_MEDIA_TYPES:
if file_name.match(f"*.{lookup_name}") or str(file_name) == lookup_name:
return GL_MEDIA_TYPE_LOOKUP[lookup_name]

raise ValueError(
f"Media type for {file_name} is not defined. You may want to add the definition to parse_features_lib"
Expand Down