Skip to content

Commit

Permalink
Merge pull request #3 from BeAPI/skip-dev-packages
Browse files Browse the repository at this point in the history
Skip dev-master packages
  • Loading branch information
jmau111 authored Jun 8, 2018
2 parents 45b9772 + c09fb74 commit f1892bf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Command/MakeStableCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,20 @@ protected function execute( InputInterface $input, OutputInterface $output ) {
$composerJson = $composerFile->read();
if ( isset( $composerJson['require'] ) ) {
foreach ( $composerJson['require'] as $package => $version ) {
if ( 'dev-master' === $composerJson['require'][ $package ] ) {
continue;
}

$composerJson['require'][ $package ] = $this->stable;
}
}

if ( isset( $composerJson['require-dev'] ) ) {
foreach ( $composerJson['require-dev'] as $package => $version ) {
if ( 'dev-master' === $composerJson['require-dev'][ $package ] ) {
continue;
}

$composerJson['require-dev'][ $package ] = $this->stable;
}
}
Expand Down

0 comments on commit f1892bf

Please sign in to comment.