Skip to content

Commit

Permalink
Use the new castor open function
Browse files Browse the repository at this point in the history
  • Loading branch information
JorickPepin committed Mar 9, 2024
1 parent 10953cf commit 2cd3e8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .castor/docker.php
Expand Up @@ -17,6 +17,7 @@
use function Castor\fs;
use function Castor\io;
use function Castor\log;
use function Castor\open;
use function Castor\run;
use function Castor\variable;

Expand Down Expand Up @@ -53,10 +54,10 @@ function about(): void
io()->listing(array_map(fn ($url) => "https://{$url}", $urls));
}

#[AsTask(description: 'Opens the project in your browser', namespace: '')]
function open(): void
#[AsTask(description: 'Opens the project in your browser', namespace: '', aliases: ['open'])]
function open_project(): void
{
run(['open', 'https://' . variable('root_domain')], quiet: true);
open('https://' . variable('root_domain'));
}

#[AsTask(description: 'Builds the infrastructure', aliases: ['build'])]
Expand Down
3 changes: 3 additions & 0 deletions castor.php
Expand Up @@ -2,6 +2,7 @@

use Castor\Attribute\AsTask;

use function Castor\guard_min_version;
use function Castor\import;
use function Castor\io;
use function Castor\notify;
Expand All @@ -14,6 +15,8 @@
use function docker\workers_start;
use function docker\workers_stop;

guard_min_version('0.14.0');

import(__DIR__ . '/.castor');

/**
Expand Down

0 comments on commit 2cd3e8c

Please sign in to comment.