Skip to content

Commit df48e3b

Browse files
author
Owen Conti
committed
Add extra argument for subdomain in addition to the branch
1 parent 022df82 commit df48e3b

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

app/Commands/DeleteSite.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class DeleteSite extends Command
1515
{forge-cli-token : The Forge CLI token to use}
1616
{forge-server-id : The Forge server ID to use}
1717
{root-domain : The root domain to use (example.com)}
18-
{branch : The name of the branch to delete.}';
18+
{subdomain : The subdomain of the site}';
1919

2020
protected $description = 'Deletes the site on the server, including the database.';
2121

@@ -24,7 +24,7 @@ class DeleteSite extends Command
2424
public function handle(): void
2525
{
2626
$this->buildForge();
27-
$this->domain = $this->argument('branch') . '.' . $this->argument('root-domain');
27+
$this->domain = $this->argument('subdomain') . '.' . $this->argument('root-domain');
2828

2929
try {
3030
$this->deleteSite();

app/Commands/DeploySite.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ class DeploySite extends Command
1111
{
1212
protected $signature = 'app:deploy-site
1313
{forge-cli-token : The Forge CLI token to use}
14-
{forge-server-id : The Forge server ID to use}
14+
{forge-server-id : The Forge server ID to use}
1515
{root-domain : The root domain to use (example.com)}
1616
{git-provider : The git provider to use (github, gitlab)}
1717
{repository : The repository to use (username/repository)}
18-
{branch : The name of the branch to deploy (will be used for the subdomain and database name)}
18+
{branch : The name of the branch to deploy}
19+
{subdomain : The subdomain to use for the site and the site\'s database)}
1920
{php-version : The PHP version to use (php82, php81, php80, php74)}
2021
{env : Base64 encoded .env file to use for the site}';
2122

@@ -29,7 +30,7 @@ class DeploySite extends Command
2930
public function handle(): void
3031
{
3132
$this->buildForge();
32-
$this->domain = $this->argument('branch') . '.' . $this->argument('root-domain');
33+
$this->domain = $this->argument('subdomain') . '.' . $this->argument('root-domain');
3334

3435
try {
3536
$site = $this->getSite();
@@ -58,7 +59,7 @@ protected function createSite(): Site
5859

5960
$site = $this->forge->createSite($this->forgeServerId, [
6061
'domain' => $this->domain,
61-
'database' => $this->argument('branch'),
62+
'database' => $this->argument('subdomain'),
6263
'project_type' => 'php',
6364
'php_version' => $this->argument('php-version'),
6465
'aliases' => [],

builds/forge-review-apps

-7 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)