/** * Publishes a release to a publicly available destination. * * @param ReleaseArtifact $artifact * @return PublishedRelease */ public function publish(ReleaseArtifact $artifact) { $results = $this->s3Client->putObject($artifact->getNamespace() . '.zip', $artifact->getPath()); return new PublishedRelease($artifact->getName(), $results->get('ObjectURL')); }
/** * Disposes of a distribution artifact. * * @param ReleaseArtifact $artifact * @return void */ public function dispose(ReleaseArtifact $artifact) { unlink($artifact->getPath()); }
/** * @param ReleaseArtifact $artifact * @return PublishedRelease */ public function publish(ReleaseArtifact $artifact) { $releaseFilename = $this->dataStorage->getDistDirectory($artifact->getNamespace()) . DIRECTORY_SEPARATOR . date('YmdHis') . '.zip'; copy($artifact->getPath(), $releaseFilename); return new PublishedRelease($artifact->getName(), realpath($releaseFilename)); }