Skip to content

Commit

Permalink
правки скрипта сборки
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitriitux committed Jan 12, 2024
1 parent fb944e8 commit 45f51d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 24 deletions.
5 changes: 3 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ rm -f .idea
rm -rf .git
rm -rf .github

cd cli
php update.php
mkdir libraries
cd libraries
composer require mpdf/mpdf
cd ..

rm -rf cli
Expand Down
22 changes: 0 additions & 22 deletions cli/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,10 @@
# аргументы --composer /path/to
//error_reporting(0);

$config = include __DIR__ . '/config.php';
$path_plugin = __DIR__ . '/../libraries';
$path = __DIR__ . '/../libraries/vendor/mpdf/mpdf/ttfonts';
$manifest_path = __DIR__ . '/../jmpdf.xml';


if(isset($argv[2]))
{
$composer_path = $argv[2];
}
else
{
$composer_path = $config['composer_path'];
}

if (!file_exists($path_plugin))
{
if (!mkdir($path_plugin) && !is_dir($path_plugin))
{
echo "failed to create libraries folder \n";
die();
}
}

shell_exec('cd ' . $path_plugin . '; php ' . $composer_path . ' require mpdf/mpdf');

$manifest = file_get_contents($manifest_path);
$composer_lock = json_decode(file_get_contents($path_plugin . '/composer.lock'), JSON_OBJECT_AS_ARRAY);
$mpdf_find_version = '';
Expand Down

0 comments on commit 45f51d9

Please sign in to comment.