From efea782d7086c58432477ce2847d2be1d8b25fa6 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Fri, 15 May 2015 15:13:10 +0200 Subject: [PATCH] use new metadata api --- app/Controller/Github/Hook/Receive.php | 16 ++++++---------- app/views/layout.phtml | 5 +---- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/app/Controller/Github/Hook/Receive.php b/app/Controller/Github/Hook/Receive.php index c53878c..ec0d9fc 100644 --- a/app/Controller/Github/Hook/Receive.php +++ b/app/Controller/Github/Hook/Receive.php @@ -8,10 +8,9 @@ use app\Model\Accounts; use app\Web; use http\Params; use pharext\Task; +use pharext\Metadata; use pharext\SourceDir; -require_once __DIR__."/../../../../vendor/m6w6/pharext/src/pharext/Version.php"; - class Receive implements Controller { private $app; @@ -93,19 +92,16 @@ class Receive implements Controller } private function createReleaseAsset($release, $repo) { - $source = (new Task\GitClone($repo->clone_url, $release->tag_name))->run(); - $iterator = new SourceDir\Git($source); - $meta = [ - "header" => sprintf("pharext v%s (c) Michael Wallner ", \pharext\VERSION), - "version" => \pharext\VERSION, - "date" => date("Y-m-d"), + $dir = (new Task\GitClone($repo->clone_url, $release->tag_name))->run(); + $src = new SourceDir\Git($dir); + $meta = Metadata::all() + [ "name" => $repo->name, "release" => $release->tag_name, - "license" => @file_get_contents(current(glob($iterator->getBaseDir()."/LICENSE*"))), + "license" => $src->getLicense(), "stub" => "pharext_installer.php", "type" => false ? "zend_extension" : "extension", ]; - $file = (new Task\PharBuild($iterator, $meta))->run(); + $file = (new Task\PharBuild($src, $meta))->run(); return $file; } diff --git a/app/views/layout.phtml b/app/views/layout.phtml index 383ae22..6bf5eb4 100644 --- a/app/views/layout.phtml +++ b/app/views/layout.phtml @@ -46,10 +46,7 @@ © 2015 m6w6 <mike@php.net> — Powered by pharext - +

-- 2.30.2