Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix composer branch-alias constraint #2392

Merged
merged 1 commit into from
Oct 14, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions commands/make/make.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,11 @@ function drush_make_convert_composer_to_make($composer_lock, $composer_json) {
$group[$project_name]['download']['url'] = $package['source']['url'];
// Dev versions should use git branch + revision, otherwise a tag is used.
if (strstr($package['version'], 'dev')) {
// Change 'dev-' prefix to '-dev' suffix.
// 'dev-' prefix indicates a branch-alias. Stripping the dev prefix from
// the branch name is sufficient.
// @see https://getcomposer.org/doc/articles/aliases.md
if (strpos($package['version'], 'dev-') === 0) {
$group[$project_name]['download']['branch'] = str_replace('dev-', '', $package['version']) . '-dev';
$group[$project_name]['download']['branch'] = substr($package['version'], 4);
}
// Otherwise, leave as is. Version may already use '-dev' suffix.
else {
Expand Down