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-10 10:50:45 +02:00
|
|
|
// For loading recipes
|
|
|
|
set_include_path(__DIR__ . '/..' . PATH_SEPARATOR . get_include_path());
|
|
|
|
|
|
|
|
putenv('DEPLOYER_LOCAL_WORKER=true');
|
|
|
|
define('DEPLOYER_BIN', __DIR__ . '/../bin/dep');
|
|
|
|
define('__FIXTURES__', __DIR__ . '/fixtures');
|
|
|
|
define('__REPOSITORY__', __DIR__ . '/fixtures/repository');
|
|
|
|
define('__TEMP_DIR__', sys_get_temp_dir() . '/deployer');
|
2020-10-09 00:15:28 +02:00
|
|
|
|
2022-03-13 17:08:44 +01:00
|
|
|
require_once __DIR__ . '/legacy/AbstractTest.php';
|
|
|
|
require_once __DIR__ . '/joy/JoyTest.php';
|
2020-10-09 00:42:43 +02:00
|
|
|
|
|
|
|
// Init repository
|
2020-10-10 10:50:45 +02:00
|
|
|
$repository = __REPOSITORY__;
|
2021-03-12 13:56:16 +03:00
|
|
|
|
2020-10-09 00:15:28 +02:00
|
|
|
`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'`;
|