Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added bin/splitsh-lite-mac
Binary file not shown.
Binary file added bin/splitsh-lite-unix
Binary file not shown.
31 changes: 29 additions & 2 deletions box.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"banner": [
"Winter CMS CLI helper.",
"",
"(c) 2020 Ben Thomson",
"(c) 2020 Ben Thomson / Winter CMS",
"",
"This source file is subject to the MIT license that is bundled",
"with this source code in the file LICENSE."
Expand All @@ -17,5 +17,32 @@
"version": "##version##",
"datetime": "##datetime##"
},
"algorithm": "SHA256"
"algorithm": "SHA256",
"files": [
"index.php"
],
"directories": [
"src"
],
"directories-bin": [
"bin"
],
"finder": [
{
"notName": "/LICENSE|.*\\.md|.*\\.dist|Makefile|composer\\.json|composer\\.lock/",
"exclude": [
"doc",
"test",
"test_old",
"tests",
"Tests",
"vendor-bin"
],
"in": "vendor"
},
{
"name": "composer.json",
"in": "."
}
]
}
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"require": {
"php": ">=7.2",
"symfony/console": "^4.4.13",
"symfony/process": "^4.4.13",
"php-http/guzzle6-adapter": "^2.0",
"knplabs/github-api": "^2.15"
},
Expand Down
63 changes: 62 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions src/BaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
*/
class BaseCommand extends SymfonyCommand
{
/** @var InputInterface Input interface */
protected $input;

/** @var OutputInterface Output interface */
protected $output;

Expand All @@ -23,6 +26,7 @@ class BaseCommand extends SymfonyCommand
*/
public function run(InputInterface $input, OutputInterface $output)
{
$this->input = $input;
$this->output = $output;

// Add success style
Expand Down Expand Up @@ -141,4 +145,18 @@ protected function error(string $text, int $verbosity = OutputInterface::VERBOSI
{
$this->output->writeln('<error>' . $text . '</error>', $verbosity);
}

/**
* Gets the base directory for the application.
*
* @param string $path A path to append to the base directory.
* @return string
*/
protected function getBaseDir(string $path = '')
{
return dirname(__DIR__) . ((!empty($path))
? DIRECTORY_SEPARATOR . trim($path, DIRECTORY_SEPARATOR)
: ''
);
}
}
Loading