Skip to content

Commit

Permalink
[TASK] Move binaries in bin folder and rename tests folder
Browse files Browse the repository at this point in the history
  • Loading branch information
simonschaufi committed Feb 18, 2020
1 parent 13ac3cf commit b8f87e8
Show file tree
Hide file tree
Showing 62 changed files with 68 additions and 33 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
.idea/
phpunit.xml
vendor/
phpunit.xml
.php_cs.cache
.php_cs
# The Api reference is auto generated and should not be part of the repository
/Documentation-GENERATED-temp
sphpdox.phar
_Output/
Documentation/.doctrees
bin/
33 changes: 33 additions & 0 deletions bin/release
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env php
<?php

requireAutoloader();

$app = new \Symfony\Component\Console\Application('TYPO3 Surf', '1.0.0');
$app->add(new \TYPO3\Surf\Command\ReleaseCommand());
$app->setDefaultCommand('release');
$app->run();

function requireAutoloader()
{
$autoloadPaths = [
// Package was included as a library
__DIR__ . '/../../../autoload.php',
// Local package usage
__DIR__ . '/../vendor/autoload.php',
// Local package in packages folder
__DIR__ . '/../../../vendor/autoload.php',
];
foreach ($autoloadPaths as $path) {
if (file_exists($path)) {
/** @noinspection PhpIncludeInspection */
return file_exists($path) && include $path;
}
}

$msg = 'You must set up the project dependencies, run the following commands:' . PHP_EOL .
'curl -sS https://getcomposer.org/installer | php' . PHP_EOL .
'php composer.phar install' . PHP_EOL;
fwrite(STDERR, $msg);
exit(1);
}
32 changes: 32 additions & 0 deletions bin/surf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env php
<?php

requireAutoloader();

$app = new \TYPO3\Surf\Cli\Symfony\ConsoleApplication('TYPO3 Surf', '3.0.0-alpha');
$app->setFactory(new \TYPO3\Surf\Integration\Factory());
$app->run();

function requireAutoloader()
{
$autoloadPaths = [
// Package was included as a library
__DIR__ . '/../../../autoload.php',
// Local package usage
__DIR__ . '/../vendor/autoload.php',
// Local package in packages folder
__DIR__ . '/../../../vendor/autoload.php',
];
foreach ($autoloadPaths as $path) {
if (file_exists($path)) {
/** @noinspection PhpIncludeInspection */
return file_exists($path) && include $path;
}
}

$msg = 'You must set up the project dependencies, run the following commands:' . PHP_EOL .
'curl -sS https://getcomposer.org/installer | php' . PHP_EOL .
'php composer.phar install' . PHP_EOL;
fwrite(STDERR, $msg);
exit(1);
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
},
"autoload-dev": {
"psr-4": {
"TYPO3\\Surf\\Tests\\": "Tests"
"TYPO3\\Surf\\Tests\\": "tests"
}
},
"bin": [
"surf"
"bin/surf"
],
"config": {
"platform": {
Expand Down
15 changes: 0 additions & 15 deletions release

This file was deleted.

14 changes: 0 additions & 14 deletions surf

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit b8f87e8

Please sign in to comment.