Skip to content

Commit

Permalink
Added a bugnsag:deploy console command
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Jul 25, 2016
1 parent f114ff3 commit 79f3c46
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions src/Commands/DeployCommand.php
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],
];
}
}

3 comments on commit 79f3c46

@vinkla
Copy link
Contributor

@vinkla vinkla commented on 79f3c46 Jul 25, 2016

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?

@GrahamCampbell
Copy link
Contributor Author

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/.

@vinkla
Copy link
Contributor

@vinkla vinkla commented on 79f3c46 Jul 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, cool.

Please sign in to comment.