Liip\RMT\VCS\Git::createTag PHP Method

createTag() public method

public createTag ( $tagName )
    public function createTag($tagName)
    {
        // this requires git and gpg configured
        $signOption = isset($this->options['sign-tag']) && $this->options['sign-tag'] ? '-s' : '';
        return $this->executeGitCommand("tag {$signOption} {$tagName} -m {$tagName}");
    }

Usage Example

Beispiel #1
0
 public function testSaveWorkingCopy()
 {
     $vcs = new Git();
     $vcs->createTag(new \Liip\RMT\Version('2.0.0'));
     $this->assertEquals(array(), $vcs->getAllModificationsSince('2.0.0'));
     exec('rm file2');
     $vcs->saveWorkingCopy('Remove the second file');
     $this->assertCount(1, $vcs->getAllModificationsSince('2.0.0'));
 }