Skip to content

Commit b78f7bb

Browse files
authored
Feat appimages (#279)
* Add package installers for AppImage, DEB, and RPM formats * fix: appimage install issue
1 parent ae41b21 commit b78f7bb

7 files changed

Lines changed: 13 additions & 11 deletions

File tree

InstallRelease/cli_interact.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ def remove(name: str):
566566

567567
installer = RpmPackage(name)
568568
installer.uninstall()
569-
elif package_type == "appimage":
569+
elif package_type == "AppImage":
570570
from InstallRelease.pkgs.app_images import AppImageInstaller
571571

572572
installer = AppImageInstaller(name)

InstallRelease/data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"application/x-7z-compressed",
88
]
99
_valid_install_methods = ["binary", "package"]
10-
_valid_package_types = ["deb", "rpm", "appimage", "binary"]
10+
_valid_package_types = ["deb", "rpm", "AppImage", "binary"]
1111

1212

1313
@dataclass
@@ -72,7 +72,7 @@ class Release:
7272
# Package management fields
7373
package_type: Optional[str] = field(
7474
default="binary"
75-
) # "deb", "rpm", "appimage", "binary"
75+
) # "deb", "rpm", "AppImage", "binary"
7676
install_method: Optional[str] = field(default="binary") # "binary" or "package"
7777
# author: dict
7878
# draft: bool

InstallRelease/pkgs/main.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
def detect_package_type_from_asset_name(name: str) -> Optional[str]:
1010
"""Infer package type from asset filename. Returns None if not a known package."""
1111
ext = name.lower().rsplit(".", 1)[-1] if "." in name else ""
12+
if ext == "appimage":
13+
return "AppImage"
1214
if ext in _valid_package_types:
1315
return ext
1416
return None
@@ -79,7 +81,7 @@ def detect_package_type_from_os_release() -> Optional[str]:
7981
else:
8082
# Fallback to AppImage for other Linux distros
8183
logger.debug("No specific package manager detected, using AppImage")
82-
package_type = "appimage"
84+
package_type = "AppImage"
8385

8486
if package_type not in _valid_package_types:
8587
raise ValueError(f"Unsupported package type: {package_type}")
@@ -126,10 +128,10 @@ def install_package(
126128
installer = RpmPackage(name)
127129
logger.info("Installing RPM package this will need sudo permissions...")
128130
result = installer.install(package_path)
129-
elif package_type == "appimage":
130-
from InstallRelease.pkgs.app_images import AppImageInstaller
131+
elif package_type == "AppImage":
132+
from InstallRelease.pkgs.app_images import AppImage
131133

132-
installer = AppImageInstaller(name)
134+
installer = AppImage(name)
133135
result = installer.install(package_path)
134136
else:
135137
logger.error(f"Unsupported package type: {package_type}")

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "install-release"
3-
version = "0.6.3"
3+
version = "0.6.4"
44
readme = "README.md"
55
description = "Simple package manager to easily install, update and manage any command-line(CLI) tool directly from github releases"
66
authors = [

test/fedora/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ WORKDIR /app
1818
COPY pyproject.toml uv.lock ./
1919

2020
# Sync dependencies and install the package (CLI: ir, install-release)
21-
RUN uv sync --frozen --no-dev
21+
RUN uv sync --frozen
2222

2323
# Ensure venv bin is on PATH so `ir` and `install-release` are available
2424
ENV PATH="/app/.venv/bin:$PATH"

test/ubuntu/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ WORKDIR /app
1616
COPY pyproject.toml uv.lock ./
1717

1818
# Sync dependencies and install the package (CLI: ir, install-release)
19-
RUN uv sync --frozen --no-dev
19+
RUN uv sync --frozen
2020

2121
# Ensure venv bin is on PATH so `ir` and `install-release` are available
2222
ENV PATH="/app/.venv/bin:$PATH"

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)