17 function __construct($git_url, $tag_name, $pkg_name, $options) {
18 $dir = (new Task\
GitClone($git_url, $tag_name))->run();
19 $src = !empty($options["pecl"])
20 ?
new SourceDir\
Pecl($dir)
21 : new SourceDir\
Git($dir);
24 $this->release
= $tag_name;
25 $this->name
= $pkg_name;
26 $this->zend
= !empty($options["zend"]);
28 /* override with package info from SourceDir */
29 foreach ($src->getPackageInfo() as $key => $val) {
43 $meta = Metadata
::all() +
[
44 "name" => $this->name
,
45 "release" => $this->release
,
46 "license" => $this->source
->getLicense(),
47 "stub" => "pharext_installer.php",
48 "type" => $this->zend ?
"zend_extension" : "extension",
50 $this->file
= (new Task\
PharBuild($this->source
, $meta))->run();
52 return sprintf("%s-%s.ext.phar", $this->name
, $this->release
);
55 function __toString() {
56 return (string) $this->file
;
67 function getRelease() {
68 return $this->release
;