Skip to content

Commit

Permalink
Added: Self-update command
Browse files Browse the repository at this point in the history
  • Loading branch information
igormukhingmailcom committed Jul 27, 2015
1 parent add7e95 commit f0abc91
Show file tree
Hide file tree
Showing 11 changed files with 1,518 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
vendor/*
composer.phar
bisight-etl.phar

# Testing
phpunit.xml
5 changes: 3 additions & 2 deletions bin/bisight
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php

use Symfony\Component\Console\Application;
use BiSight\Etl\Console\Application;

$loader = __DIR__ . '/../vendor/autoload.php';

Expand All @@ -19,7 +19,8 @@ if (!file_exists($loader)) {

require $loader;

$application = new Application('BiSight console tools', '0.0.1');
$application = new Application('BiSight console tools', Application::VERSION);
$application->setCatchExceptions(true);
$application->add(new \BiSight\Etl\Command\EtlRunCommand());
$application->add(new \BiSight\Etl\Command\SelfUpdateCommand());
$application->run();
14 changes: 12 additions & 2 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$projectPath = dirname(__DIR__);
require($projectPath . '/vendor/autoload.php');

use Secondtruth\Compiler\Compiler;
use BiSight\Etl\Compiler\Compiler;

$compiler = new Compiler($projectPath);
$compiler->addIndexFile('bin/bisight');
Expand All @@ -17,4 +17,14 @@ $compiler->addDirectory('vendor/symfony/console', ['**/Tests/*', '!*.php']);
// used at /src/Transformer/ExpressionTransformer.php
$compiler->addDirectory('vendor/symfony/expression-language', ['**/Tests/*', '!*.php']);

$compiler->compile("$projectPath/bisight-etl.phar");
# Self-update command dependencies
$compiler->addFile('vendor/herrera-io/phar-update/res/schema.json');
$compiler->addDirectory('vendor/herrera-io/json', ['src/tests/*', '!*.php']);
$compiler->addDirectory('vendor/herrera-io/phar-update', ['src/tests/*', '!*.php']);
$compiler->addDirectory('vendor/justinrainbow/json-schema', ['tests/*', '!*.php']);
$compiler->addDirectory('vendor/kherge/version', ['src/tests/*', '!*.php']);
$compiler->addDirectory('vendor/seld/jsonlint', ['tests/*', '!*.php']);

$compiler->compile("$projectPath/bisight-etl.phar");

echo "Compilation done\n";
9 changes: 9 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,21 @@
"linkorb/database-manager": "~1.0"
},
"require-dev": {
"phpunit/phpunit": "~4.6.6",

"herrera-io/phar-update": "1.*",
"symfony/process": "~2.1",
"secondtruth/phar-compiler": "dev-master"
},
"bin": ["bin/bisight"],
"autoload": {
"psr-4": {
"BiSight\\Etl\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"BiSight\\Etl\\Test\\": "test/"
}
}
}
Loading

0 comments on commit f0abc91

Please sign in to comment.