2013-07-11 15:47:09 +04:00
|
|
|
<?php
|
2015-06-12 23:23:30 +07:00
|
|
|
$loaded = false;
|
|
|
|
|
2015-06-17 19:30:25 +02:00
|
|
|
foreach ([__DIR__ . '/../../../autoload.php', __DIR__ . '/../vendor/autoload.php'] as $file) {
|
2015-06-12 23:23:30 +07:00
|
|
|
if (file_exists($file)) {
|
|
|
|
require $file;
|
|
|
|
$loaded = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2015-05-26 16:52:10 +03:00
|
|
|
|
2015-06-12 23:23:30 +07:00
|
|
|
if (!$loaded) {
|
|
|
|
die(
|
|
|
|
'You need to set up the project dependencies using the following commands:' . PHP_EOL .
|
2020-04-25 23:00:08 +03:00
|
|
|
'composer install' . PHP_EOL
|
2015-06-12 23:23:30 +07:00
|
|
|
);
|
2015-05-26 16:52:10 +03:00
|
|
|
}
|
2017-03-16 20:03:11 +07:00
|
|
|
|
2020-10-09 00:15:28 +02:00
|
|
|
require_once __DIR__ . '/AbstractTest.php';
|
|
|
|
|
|
|
|
// Init repository
|
|
|
|
$repository = __DIR__ . '/fixtures/repository';
|
|
|
|
define('__REPOSITORY__', $repository);
|
|
|
|
`cd $repository && git init`;
|
|
|
|
$branch = trim(`git rev-parse --abbrev-ref HEAD`);
|
|
|
|
`cd $repository && git checkout -B $branch 2>&1`;
|
|
|
|
`cd $repository && git add .`;
|
|
|
|
`cd $repository && git config user.name 'Anton Medvedev'`;
|
|
|
|
`cd $repository && git config user.email 'anton.medv@example.com'`;
|
|
|
|
`cd $repository && git commit -m 'first commit'`;
|
|
|
|
|
2017-03-19 23:44:11 +07:00
|
|
|
|
2020-07-22 19:17:25 +03:00
|
|
|
putenv('DEPLOYER_LOCAL_WORKER=true');
|
2020-04-25 23:00:08 +03:00
|
|
|
define('DEPLOYER_BIN', __DIR__ . '/../bin/dep');
|
|
|
|
define('__TEMP_DIR__', sys_get_temp_dir() . '/deployer');
|