Bugfix/list clickup issue (#5)
Reviewed-on: #5 Co-authored-by: ISMAIL MASSERAN <ismail@koppkb.com> Co-committed-by: ISMAIL MASSERAN <ismail@koppkb.com>
This commit was merged in pull request #5.
This commit is contained in:
@@ -40,32 +40,32 @@ class WebpMakeExecutables extends Command
|
||||
$DS = DIRECTORY_SEPARATOR;
|
||||
|
||||
$cwebp_compilers = [
|
||||
'Windows' => 'binaries' . $DS . 'libwebp-1.2.4-windows-x64' . $DS . 'bin' . $DS . 'cwebp',
|
||||
'Linux' => 'binaries' . $DS . 'libwebp-1.2.4-linux-x86-64' . $DS . 'bin' . $DS .'cwebp',
|
||||
'Windows' => 'binaries'.$DS.'libwebp-1.2.4-windows-x64'.$DS.'bin'.$DS.'cwebp',
|
||||
'Linux' => 'binaries'.$DS.'libwebp-1.2.4-linux-x86-64'.$DS.'bin'.$DS.'cwebp',
|
||||
'Darwin' => [
|
||||
'X86-64' => 'binaries' . $DS . 'libwebp-1.2.4-mac-X86-64' . $DS . 'bin' . $DS . 'cwebp',
|
||||
'arm64' => 'binaries' . $DS . 'libwebp-1.2.4-mac-arm64' . $DS . 'bin' . $DS .'cwebp',
|
||||
'X86-64' => 'binaries'.$DS.'libwebp-1.2.4-mac-X86-64'.$DS.'bin'.$DS.'cwebp',
|
||||
'arm64' => 'binaries'.$DS.'libwebp-1.2.4-mac-arm64'.$DS.'bin'.$DS.'cwebp',
|
||||
],
|
||||
];
|
||||
|
||||
$server_operating_system = explode(' ', trim(php_uname()))[0];
|
||||
$server_processor_architecture = trim(php_uname('m'));
|
||||
|
||||
if ($server_operating_system === 'Windows') {
|
||||
$this->error('Windows OS are not permitted');
|
||||
|
||||
if($server_operating_system === 'Windows'){
|
||||
$this->error('Windows OS are not permitted');
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
if ($server_operating_system === 'Darwin') {
|
||||
$webp_binary_path = resource_path($cwebp_compilers['Darwin'][$server_processor_architecture]);
|
||||
$webp_binary_path = resource_path($cwebp_compilers['Darwin'][$server_processor_architecture]);
|
||||
}
|
||||
|
||||
if ($server_operating_system === 'Linux') {
|
||||
$webp_binary_path = resource_path($cwebp_compilers[$server_operating_system]);
|
||||
}
|
||||
|
||||
exec('chmod +x ' . $webp_binary_path, $output, $result);
|
||||
exec('chmod +x '.$webp_binary_path, $output, $result);
|
||||
|
||||
$this->info('Webp binaries are now executables');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user