Example #1
0
 /**
  * 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'));
 }
 /**
  * @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));
 }