Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the new castor open function #289

Merged
merged 1 commit into from Mar 9, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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