Beispiel #1
0
 /**
  * FIXME passing `null`, `null` failed on svn client, but looks like
  *       it's needed by the git client. Fix the git client to accept
  *       Reference's correctly!
  *
  * @param  Version $oldVersion
  * @param  Version $newVersion
  * @return \Webcreate\Vcs\Common\VcsFileInfo[]
  */
 public function diff(Version $oldVersion, Version $newVersion)
 {
     $head = $this->getHead($oldVersion);
     $this->client->setHead($head);
     $result = $this->client->diff(null, null, $oldVersion->getBuild(), $newVersion->getBuild());
     return $result;
 }
Beispiel #2
0
 /**
  * @param Version $version1
  * @param Version $version2
  * @return int
  */
 public function versionCompare(Version $version1, Version $version2)
 {
     $build1 = $version1->getBuild();
     $build2 = $version2->getBuild();
     return $this->getDriver()->revisionCompare($build1, $build2);
 }
 public function changelog(Version $version1, Version $version2)
 {
     return $this->client->changelog($version1->getBuild(), $version2->getBuild());
 }
 /**
  * Returns the upload path for a specific version. Adds
  * a suffix if the path already exists (can happen with a
  * full deploy)
  *
  * @param  \Webcreate\Conveyor\Repository\Version $version
  * @return string
  */
 public function getUploadPath(Version $version)
 {
     $basepath = $this->transporter->getPath();
     if (null === $this->uploadPath) {
         $suffix = '';
         $count = 0;
         do {
             $releasePath = 'releases/' . $version->getName() . '-' . substr($version->getBuild(), 0, 6) . $suffix;
             $suffix = '_' . ++$count;
         } while ($this->transporter->exists($basepath . '/' . $releasePath));
         $this->uploadPath = $releasePath;
     }
     return $this->uploadPath;
 }