2020-03-23 15:12:07 +03:00
|
|
|
#!/usr/bin/env php
|
|
|
|
<?php
|
|
|
|
|
|
|
|
error_reporting(E_ALL ^ E_DEPRECATED);
|
|
|
|
|
|
|
|
require_once __DIR__ . '/../helpers/release/ReleaseBuilder.php';
|
|
|
|
require_once __DIR__ . '/../helpers/release/ModifiedFile.php';
|
|
|
|
require_once __DIR__ . '/../intaro.retailcrm/install/version.php';
|
|
|
|
|
|
|
|
define('RELEASE_DIR', __DIR__ . '/../release/');
|
|
|
|
define('ORIGINAL', __DIR__ . '/../intaro.retailcrm/');
|
|
|
|
|
|
|
|
if (!file_exists(RELEASE_DIR . 'diff')) {
|
|
|
|
print('Diff file does not exists');
|
|
|
|
exit(255);
|
|
|
|
}
|
|
|
|
|
|
|
|
$handle = fopen(RELEASE_DIR . 'diff', 'r');
|
|
|
|
|
|
|
|
if (!$handle) {
|
|
|
|
exit(255);
|
|
|
|
}
|
|
|
|
|
|
|
|
$modifiedFiles = [];
|
|
|
|
|
|
|
|
while (($buffer = fgets($handle)) !== false) {
|
2022-03-02 15:40:53 +03:00
|
|
|
$modifiedFiles[] = new ModifiedFile($buffer);
|
2020-03-23 15:12:07 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
try {
|
|
|
|
$builder = new ReleaseBuilder($modifiedFiles, $arModuleVersion['VERSION']);
|
|
|
|
$builder->build();
|
|
|
|
} catch(\Exception $exception) {
|
|
|
|
print($exception->getMessage());
|
|
|
|
exit(255);
|
|
|
|
}
|
|
|
|
|
|
|
|
exit(0);
|