Skip to content
This repository was archived by the owner on May 19, 2021. It is now read-only.

Commit 69e72cd

Browse files
committed
Fixing default upgrade lock state, properly respecting upgrade option, and adding pre-release update option.
1 parent 06296e0 commit 69e72cd

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/lib/KevinGH/Amend/Command.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Command extends Base
2121
*
2222
* @var boolean
2323
*/
24-
private $disableUpgrade = true;
24+
private $disableUpgrade = false;
2525

2626
/**
2727
* The manifest file URI.
@@ -59,6 +59,12 @@ public function setManifestUri($uri)
5959
protected function configure()
6060
{
6161
$this->setDescription('Updates the application.');
62+
$this->addOption(
63+
'pre',
64+
'p',
65+
InputOption::VALUE_NONE,
66+
'Allow pre-release updates.'
67+
);
6268
$this->addOption(
6369
'redo',
6470
'r',
@@ -95,7 +101,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
95101

96102
if ($manager->update(
97103
$this->getApplication()->getVersion(),
98-
$this->disableUpgrade
104+
$this->disableUpgrade ?: (false === $input->getOption('upgrade')),
105+
$input->getOption('pre')
99106
)){
100107
$output->writeln('<info>Update successful!</info>');
101108
} else {

0 commit comments

Comments
 (0)