This commit is contained in:
Maxim Slipenko 2024-01-21 12:41:50 +03:00
parent 85cda3e705
commit 7750d226f4
6 changed files with 40 additions and 9 deletions

View File

@ -4,8 +4,9 @@ RUN apt-get update && apt-get install -y \
wget \
apt-repo-tools \
alien \
pip && \
wget -O- https://eepm.ru/epm.sh | bash /dev/stdin ei
pip \
epm
# wget -O- https://eepm.ru/epm.sh | bash /dev/stdin ei
COPY requirements.txt .
RUN pip --no-cache-dir install -r requirements.txt

View File

@ -21,10 +21,11 @@ def create_repo(config: Config):
])
def update_cache():
utils.epm(['update'])
def update_epm():
utils.epm([
'ei'
])
utils.epm(['ei'])
@asynccontextmanager
@ -33,8 +34,8 @@ async def lifespan(app: FastAPI):
yield
app = FastAPI(lifespan=lifespan)
config = Config()
app = FastAPI(lifespan=lifespan, root_path=config.get('root_path'))
update_task_started = False
@ -56,6 +57,7 @@ def update():
update_task_started = False
return
update_cache()
update_epm()
providers_path = os.path.join(os.getcwd(), 'autorepacked/providers')

View File

@ -7,7 +7,11 @@ class RustdeskProvider(GithubReleasesProvider):
_repo = 'rustdesk/rustdesk'
def _get_release_filename(self):
return f'rustdesk-{self.get_version()}-x86_64.deb'
return f'rustdesk-{self.get_version()}.deb'
def get_version(self):
# pin version due to error in start
return '1.1.9'
def get_provider(config):

View File

@ -9,4 +9,4 @@ class SingularityApp(SnapProvider):
def get_provider(config):
return SingularityApp(config)
return SingularityApp(config)

View File

@ -2,7 +2,7 @@ from autorepacked.common_providers.github_releases_provider import GithubRelease
class TrezorSuiteProvider(GithubReleasesProvider):
_name = 'Trezor-Suite'
_name = 'trezor-suite'
_repo = 'trezor/trezor-suite'
@ -12,6 +12,9 @@ class TrezorSuiteProvider(GithubReleasesProvider):
def _get_release_filename(self):
return f'Trezor-Suite-{self.get_version()}-linux-x86_64.AppImage'
def get_download_name(self):
return f"trezor-suite-{self.get_version()}-linux-x86_64.AppImage"
def get_provider(config):
return TrezorSuiteProvider(config)

View File

@ -0,0 +1,21 @@
from autorepacked.common_providers.github_releases_provider import GithubReleasesProvider
class UltimakerCuraProvider(GithubReleasesProvider):
_name = 'ultimaker-cura'
_repo = 'Ultimaker/Cura'
def _get_release_filename(self):
return f'UltiMaker-Cura-{self.get_version()}-linux.AppImage'
def get_download_name(self):
return f"ultimaker-cura-{self.get_version()}-linux-x86_64.AppImage"
def get_version(self):
# pin version due to error in start
return '5.4.0'
def get_provider(config):
return UltimakerCuraProvider(config)