generated from ghostwriter/wip
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
- Loading branch information
1 parent
b54de06
commit 61a25a6
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Ghostwriter\Compliance\Tool; | ||
|
||
final class ComposerUpdate extends AbstractTool | ||
{ | ||
public function command(): string | ||
{ | ||
return 'composer update && git add composer.json && git add composer.lock && git commit -m "Update composer files" && git push;'; | ||
} | ||
|
||
/** | ||
* @return string[] | ||
*/ | ||
public function configuration(): array | ||
{ | ||
if ($_ENV['GITHUB_REPOSITORY'] === 'ghostwriter/wip') { | ||
return ['composer.json']; | ||
} | ||
return ['ComposerUpdate.json']; | ||
} | ||
} |