Skip to content

Commit

Permalink
Move builder to bin dir
Browse files Browse the repository at this point in the history
/tools dir will be excluded by git attribute
  • Loading branch information
twose committed Jan 4, 2022
1 parent 461c6fb commit 9d1aa50
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
25 changes: 15 additions & 10 deletions tools/swow-builder → bin/swow-builder
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,22 @@
* please view the LICENSE file that was distributed with this source code
*/

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

use function Swow\Tools\askBool;
use function Swow\Tools\br;
use function Swow\Tools\error;
use function Swow\Tools\notice;
use function Swow\Tools\log;
use function Swow\Tools\ok;
use function Swow\Tools\success;
use function Swow\Tools\warn;
use function Swow\Tools\passthru;
use function Swow\Util\askBool;
use function Swow\Util\br;
use function Swow\Util\error;
use function Swow\Util\notice;
use function Swow\Util\log;
use function Swow\Util\ok;
use function Swow\Util\success;
use function Swow\Util\warn;
use function Swow\Util\passthru;

if (PHP_OS_FAMILY === 'Windows') {
error(
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"cs-fix": [ "@php vendor/bin/php-cs-fixer fix" ],
"rector": [ "@php vendor/bin/rector process --config=tools/rector.php" ],
"sync-extension": [ "@php -n tools/sync-extension.php" ],
"build-extension": [ "@php tools/swow-builder" ],
"build-extension": [ "@php bin/swow-builder" ],
"rebuild-extension": [ "@build-extension --rebuild" ],
"rebuild-debug-extension": [ "@build-extension --rebuild --debug" ],
"install-extension": [ "@build-extension --install" ],
Expand All @@ -75,6 +75,6 @@
"split": [ "@php -n tools/split.php" ]
},
"bin": [
"tools/swow-builder"
"bin/swow-builder"
]
}

0 comments on commit 9d1aa50

Please sign in to comment.