Skip to content

Commit

Permalink
Merge pull request #13 from Aeliot-Tm/fix-release
Browse files Browse the repository at this point in the history
Fix base path for build
  • Loading branch information
Aeliot-Tm authored Aug 30, 2024
2 parents 79ad317 + b2035a2 commit d7612dd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"baseline"
],
"scripts": {
"build": "tools/box.phar compile --config=scripts/box/config.json",
"build": "php scripts/box/prepare-config.php && tools/box.phar compile --config=scripts/box/config.json",
"cs-check": "@cs-fixer-check",
"cs-fix": "@cs-fixer-fix",
"cs-fixer-check": "vendor/bin/php-cs-fixer fix --dry-run",
Expand Down
19 changes: 19 additions & 0 deletions scripts/box/prepare-config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

declare(strict_types=1);

/*
* This file is part of the box project.
*
* (c) Anatoliy Melnikov <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

$configPath = __DIR__ . '/config.json';
$config = json_decode(file_get_contents($configPath), true, 512, \JSON_THROW_ON_ERROR);

$config['base-path'] = dirname($configPath, 2);

file_put_contents($config, json_encode($config, \JSON_THROW_ON_ERROR));

0 comments on commit d7612dd

Please sign in to comment.