1
0
Fork 0
mirror of synced 2025-04-20 01:21:01 +00:00

check required files

This commit is contained in:
Akolzin Dmitry 2020-03-19 11:32:03 +03:00
parent f2ba164144
commit 1675391c8f
4 changed files with 12 additions and 2 deletions

View file

@ -40,7 +40,7 @@ create_db:
echo "USE mysql;\nUPDATE user SET password=PASSWORD('root') WHERE user='root';\nFLUSH PRIVILEGES;\n" | mysql -u root
mysqladmin create $(DB_BITRIX_NAME) --user=$(DB_BITRIX_LOGIN) --password=$(DB_BITRIX_PASS)
build_release:
build_release: build_release_dir
bash bin/build $(VERSION) $(ROOT_DIR)/release/
build_release_dir: build_diff_file

View file

@ -20,6 +20,12 @@ class ModifiedFile
/** @var string */
const MODULE_ID = 'intaro.retailcrm';
/** @var string */
const DESCRIPTION = 'description.ru';
/** @var string */
const VERSION = 'install/version.php';
/** @var string */
protected $filename;

View file

@ -46,6 +46,10 @@ class ReleaseBuilder
$modifiedFiles[] = $this->getRealFilename($file->getFilename());
}
if (!in_array(ModifiedFile::DESCRIPTION, $modifiedFiles) || !in_array(ModifiedFile::VERSION, $modifiedFiles)) {
throw new \UnexpectedValueException('Version or description file does not exists');
}
if (empty($modifiedFiles)) {
throw new \LogicException('Not found modified files for release');
}

View file

@ -1,5 +1,5 @@
<?
$arModuleVersion = array(
"VERSION" => "5.2.5",
"VERSION_DATE" => "2020-01-09 12:02:00"
"VERSION_DATE" => "2020-01-09 12:02:00"
);