/** * @param TargetInterface $target * * @return array * * @see http://moquet.net/blog/distributing-php-cli/ */ public function build(TargetInterface $target) { $manifest = []; $versions = $this->repository->getPackageVersions(); foreach ($versions as $version) { $filepath = $target->downloadPhar($this->repository, $version); if (!$filepath) { continue; } $manifest[] = ['name' => basename($filepath), 'sha1' => sha1_file($filepath), 'url' => $target->getPharUrl($this->repository, $version), 'version' => $version]; } return $manifest; }