-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a bugnsag:deploy console command
- Loading branch information
1 parent
f114ff3
commit 79f3c46
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
namespace Bugsnag\BugsnagLaravel\Commands; | ||
|
||
use Bugsnag\BugsnagLaravel\Facades\Bugsnag; | ||
use Illuminate\Console\Command; | ||
use Symfony\Component\Console\Input\InputOption; | ||
|
||
class DeployCommand extends Command | ||
{ | ||
/** | ||
* The console command name. | ||
* | ||
* @var string | ||
*/ | ||
protected $name = 'bugsnag:deploy'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Notifies Bugsnag of a deployment'; | ||
|
||
/** | ||
* Execute the console command. | ||
* | ||
* @return void | ||
*/ | ||
public function fire() | ||
{ | ||
Bugsnag::deploy($this->option('repository'), $this->option('branch'), $this->option('revision')); | ||
} | ||
|
||
/** | ||
* Get the console command options. | ||
* | ||
* @return array | ||
*/ | ||
protected function getOptions() | ||
{ | ||
return [ | ||
['repository', null, InputOption::VALUE_OPTIONAL, 'The desired namespace.', null], | ||
['branch', null, InputOption::VALUE_OPTIONAL, 'The desired namespace.', null], | ||
['revision', null, InputOption::VALUE_OPTIONAL, 'The desired namespace.', null], | ||
]; | ||
} | ||
} |
79f3c46
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy? I'm curious, how will this work? Is it just to test the integration?
79f3c46
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a deployment API at https://docs.bugsnag.com/api/deploy-tracking/.
79f3c46
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, cool.