flux-eco / source-downloader
Component for flux-capacitor apps developed by fluxlabs
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:flux-eco
Requires
- php: >=7.4
- ext-curl: *
- ext-json: *
- ext-yaml: *
- flux-eco/dot-env: >=0.0.1
- flux-eco/shell-executor: >=0.0.1
README
This component supports the downloading of software sources. e.g. for building docker containers
Usage
sourceList.yaml
- sourceType: tar-gz
directoryPath: /var/www
directoryName: ilias
url: https://github.com/ILIAS-eLearning/ILIAS/releases/download/v7.7/ILIAS-7.7.tar.gz
- sourceType: git
url: https://github.com/fluxapps/SrContainerObjectMenu.git
directoryPath: /var/www/ilias/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook
directoryName: SrContainerObjectMenu
tag: v2.5.7
.env
SOURCE_DOWNLOADER_SOURCE_LIST_FILE_PATH=sourceList.yaml
SOURCE_DOWNLOADER_VOLUME_PATH=/tmp
SOURCE_DOWNLOADER_GIT_FULL_CLONE=0
Object-Oriented Usage
<?php
require_once __DIR__ . '/../vendor/autoload.php';
use FluxEco\SourceDownloader;
use FluxEco\DotEnv;
DotEnv\Api::new()->load(__DIR__);
$sourceListFile = getenv(SourceDownloader\Env::SOURCE_LIST_FILE_PATH);
$volumePath = getenv(SourceDownloader\Env::VOLUME_PATH);
$gitGetFullClone = getenv(SourceDownloader\Env::GIT_FULL_CLONE);
$api = SourceDownloader\Api::new($gitGetFullClone);
$api->downloadSources($sourceListFile, $volumePath);
Functional Usage
<?php
require_once __DIR__ . '/../vendor/autoload.php';
fluxy\loadDotEnv(__DIR__);
fluxy\downloadSources(
fluxy\getEnvSourceDownloaderSourceListFilePath(),
fluxy\getEnvSourceDownloaderVolumePath(),
fluxy\getEnvSourceDownloaderGitFullClone()
);
Contributing 💜
Please ...
- ... register an account at https://git.fluxlabs.ch
- ... create pull requests 🔥
Adjustment suggestions / bug reporting 🐾
Please ...
- ... register an account at https://git.fluxlabs.ch
- ... ask us for a Service Level Agreement: support@fluxlabs.ch 😘
- ... read and create issues