Skip to content

Commit

Permalink
Create ComposerUpdate
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
  • Loading branch information
ghostwriter committed Mar 13, 2024
1 parent b54de06 commit 61a25a6
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/Tool/ComposerUpdate
@@ -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'];
}
}

0 comments on commit 61a25a6

Please sign in to comment.