Ejemplo n.º 1
0
 /**
  * Return all tags for the deployed commit.
  *
  * @return ArrayList
  */
 public function getTags()
 {
     $returnTags = array();
     $repo = $this->getRepository();
     if ($repo) {
         $tags = $repo->getReferences()->resolveTags($this->SHA);
         if (!empty($tags)) {
             foreach ($tags as $tag) {
                 $field = Varchar::create('Tag', '255');
                 $field->setValue($tag->getName());
                 $returnTags[] = $field;
             }
         }
     }
     return new ArrayList($returnTags);
 }
Ejemplo n.º 2
0
 /**
  * Return all tags for the deployed commit.
  *
  * @return ArrayList
  */
 public function getTags()
 {
     $commit = $this->Environment()->getCommit($this->SHA);
     if (!$commit) {
         return new ArrayList([]);
     }
     $tags = $this->Environment()->getCommitTags($commit);
     $returnTags = [];
     if (!empty($tags)) {
         foreach ($tags as $tag) {
             $field = Varchar::create('Tag', '255');
             $field->setValue($tag->getName());
             $returnTags[] = $field;
         }
     }
     return new ArrayList($returnTags);
 }