Skip to content

Commit

Permalink
Add rebuild command
Browse files Browse the repository at this point in the history
  • Loading branch information
JimChenWYU committed Jun 11, 2019
1 parent d1cb2ad commit cecfe7b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
"tests/unit"
]
},
"bin": [
"rebuild"
],
"extra": {
"class": "hiqdev\\composer\\config\\Plugin",
"branch-alias": {
Expand Down
19 changes: 19 additions & 0 deletions rebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env php
<?php

use hiqdev\composer\config\Builder;

if (!ini_get('date.timezone')) {
ini_set('date.timezone', 'UTC');
}

foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php') as $file) {
if (file_exists($file)) {
require_once $file;
break;
}
}

unset($file);

Builder::rebuild(Builder::findOutputDir(dirname(dirname(__DIR__))));

0 comments on commit cecfe7b

Please sign in to comment.