Skip to content

Commit

Permalink
Merge pull request #64 from clue-labs/async
Browse files Browse the repository at this point in the history
Add new Async component to core components
  • Loading branch information
WyriHaximus authored Jul 10, 2022
2 parents dfa0898 + c97ea70 commit aab0069
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
11 changes: 7 additions & 4 deletions bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,20 @@ function run($command, $cwd = null)
});
}

function checkout($dir, $gitUrl, $tag)
function checkout($dir, $gitUrl, ?string $tag)
{
if (!is_dir($dir)) {
run('git clone ' . $gitUrl . ' "' . $dir . '"');
}

run('git fetch', $dir);
run('git checkout -f ' . $tag, $dir);

if ($tag !== null) {
run('git checkout -f ' . $tag, $dir);
}
}

function component(Symfony\Component\Console\Output\ConsoleOutput $output, $componentsDir, $name, $gitUrl, string $latestVersion)
function component(Symfony\Component\Console\Output\ConsoleOutput $output, $componentsDir, $name, $gitUrl, ?string $latestVersion)
{
$componentDir = $componentsDir . DIRECTORY_SEPARATOR . $name;

Expand Down Expand Up @@ -60,7 +63,7 @@ if (!$input->hasParameterOption('--no-component-update')) {
$componentsDir,
$component['name'],
$component['clone_url'],
$component['releases'][0]['tag']
$component['releases'] ? $component['releases'][0]['tag'] : null
);

$output->writeln('<info>Done.</info>');
Expand Down
5 changes: 5 additions & 0 deletions data/components.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
'repository' => 'reactphp/promise',
'category' => 'Core Components'
],
[
'title' => 'Async',
'repository' => 'reactphp/async',
'category' => 'Core Components'
],
[
'title' => 'Socket',
'repository' => 'reactphp/socket',
Expand Down

0 comments on commit aab0069

Please sign in to comment.