check required files
This commit is contained in:
parent
f2ba164144
commit
1675391c8f
4 changed files with 12 additions and 2 deletions
2
Makefile
2
Makefile
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue