Skip to content

Commit

Permalink
Merge f9c5058 into 515c46b
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksm committed Nov 9, 2019
2 parents 515c46b + f9c5058 commit 5a99c59
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/CosyComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,19 @@ protected function handleIndividualUpdates($data, $lockdata, $cdata, $one_pr_per
$version_to = $post_update_data->source->reference;
}
// Now, see if it the update was actually to the version we are expecting.
// If we are updating to another dev version, composer show will tell us something like:
// dev-master 15eb463
// while the post update data version will still say:
// dev-master.
// So to compare these, we compare the hashes, if the version latest we are updating to
// matches the dev regex.
if (preg_match('/dev-\S* /', $item->latest)) {
$sha = preg_replace('/dev-\S* /', '', $item->latest);
// Now if the version_to matches this, we have updated to the expected version.
if (strpos($version_to, $sha) === 0) {
$post_update_data->version = $item->latest;
}
}
if ($post_update_data->version != $item->latest) {
$new_branch_name = $this->createBranchNameFromVersions(
$item->name,
Expand Down

0 comments on commit 5a99c59

Please sign in to comment.