/** * Execute the console command. * * @return mixed */ public function fire() { // setup for development of this package echo "This will assist Artistan/Workbench development by composer dump and such\n please pass -c to publish config. do not edit this config unless adding features.\n\n"; // publish config to package configs... if ($this->option('publishConfig')) { $this->benchhelper->exec('php artisan config:publish --path="workbench/artistan/workbench/src/config" artistan/workbench'); echo "update configs in app/config/packages/artistan/workbench/config.php\n"; } $this->benchhelper->composerVendorCleanup(['artistan/workbench']); $this->benchhelper->composer('artistan/workbench', 'update'); $this->benchhelper->composer(); }
/** * Execute the console command. * * @return mixed */ public function fire() { $this->benchhelper->chStorage(); $packages = \Config::get('workbench::packages'); foreach ($packages as $name => $package) { $this->info("PACKAGE: {$name}"); if (isset($package['git'])) { if (!$this->option('skipAssets')) { $this->call('asset:publish', array('--bench' => $name)); } if ($this->option('publishConfigs')) { // this should not be done all the time, first time only (install) $this->call('config:publish', array('package' => $name, '--path' => 'workbench/' . $name . '/src/config')); } } $this->info("============================"); } $this->info("publishing complete!"); }
/** * Execute the console command. * * @return mixed */ public function fire() { $this->benchhelper->chStorage(); $packages = \Config::get('workbench::packages'); $packageNames = array_keys($packages); $destroy = false; if ($this->option('destroy')) { if ($this->confirm('Are you sure you want to remove all configured workbench packages? [yes|no]')) { $destroy = true; } } foreach ($packages as $name => $package) { $this->info("PACKAGE: {$name}"); if (isset($package['git'])) { $action = $this->benchhelper->getGit($name, $package['git'], $destroy); if ($this->option('remote') && !empty($package['remotes']) && is_array($package['remotes'])) { $this->info("remotes"); $this->benchhelper->fetchRemotes($name, $package['remotes']); } if ($this->option('merge')) { $this->benchhelper->mergeRemote($this->option('merge')); } if (!$this->option('skipBower')) { $this->benchhelper->bower($name); } if (!$this->option('skipComposer')) { $this->benchhelper->composer($packageNames, $name, $action); } if (!$this->option('skipAssets')) { $this->call('asset:publish', array('--bench' => $name)); } if ($this->option('publishConfigs') || $action == 'install') { // this should not be done all the time, first time only (install) $this->call('config:publish', array('package' => $name, '--path' => 'workbench/' . $name . '/src/config')); } } $this->info("============================"); } if (!$this->option('skipBower')) { $this->benchhelper->bower(); } if (!$this->option('skipComposer')) { $this->benchhelper->composer($packageNames); } $this->info("do not forget to register your providers!"); }
/** * Execute the console command. * * @return mixed */ public function fire() { echo "This will publish assets & configs.\n"; echo "Optionally publish views (-p).\n"; if ($this->confirm('Do you wish to launch your configured packages from vendors directory?')) { $this->benchhelper->chStorage(); $packages = \Config::get('workbench::packages'); foreach ($packages as $name => $package) { echo "--- {$name} ---\n"; $this->benchhelper->exec('php artisan config:publish ' . $name, false); echo "published configs\n"; $this->benchhelper->exec('php artisan asset:publish ' . $name, false); echo "published assets\n"; if ($this->option('publishViews')) { $this->benchhelper->exec('php artisan view:publish ' . $name, false); echo "published views\n"; } else { echo "skipping views (-p)\n"; } } } $this->benchhelper->composer('artistan/workbench', 'update'); $this->benchhelper->composer(); }
<?php namespace asylgrp\workbench; require __DIR__ . '/../vendor/autoload.php'; if (!defined('WORKBENCH_INI_FILE')) { define('WORKBENCH_INI_FILE', __DIR__ . '/../workbench.ini.dist'); } $wb = new Workbench(new Settings(parse_ini_file(WORKBENCH_INI_FILE, true), new PathResolver([__DIR__ . '/..']))); foreach ($wb->get('settings')->readAll('php_value') as $name => $value) { ini_set(substr($name, 10), $value); } $wb->get('http_emitter')->emit($wb->get('http_runner')->__invoke($wb->get('http_request'), $wb->get('http_response')));