I'm trying to create a D7 version of an installation profile - with a make file, and get the message:

The 'core' attribute 7.0-alpha3 has an incorrect format. [error]

Is this by design because D7 is an alpha release, or a bug because it isn't recognising it properly, or have I put it in wrongly?

CommentFileSizeAuthor
#5 drush_make_core_regex_fix.patch824 byteshunmonk

Comments

dww’s picture

Title: Using D7 core in profile make file » 7.0-alpha3 core version not recognized as valid in a profile make file
Project: Project » Drush Make
Version: x.y.z » 6.x-2.x-dev
Component: Packages » Drupal.org integration
Category: support » bug

Sounds like a bug in drush make. Are you doing this on the command-line directly with drush, or are you using the UI on drupal.org?

juliangb’s picture

UI in drupal.org.

I first found it when trying to create a release - and then also when I tried the 'verify make file' function.

hunmonk’s picture

this is a problem in drush_make_validate_info_file() -- the regex doesn't support any alpha|beta|rc releases at all:

elseif (preg_match('/^(\d+)(\.(x|(\d+)))?$/', $info['core'], $matches)) {
dww’s picture

Component: Drupal.org integration » Code

So it's not just in the d.o-specific plugin for drush make, after all. Moving component...

hunmonk’s picture

Status: Active » Needs review
StatusFileSize
new824 bytes

how's this look?

dww’s picture

Untested, but that visually appears fine to me.

It's case-sensitive, though, so you might want [a-zA-Z0-9]+ just in case (although our version strings are _supposed_ to be lowercase). Or, at that point, you could just use 1 or more "word" characters: \w+ since it's basically equivalent except \w also matches underscores.

*shrug*

hunmonk’s picture

.make files are specified according to the visible version string (the kind you'd see on the title of release nodes), so for consistency i'll keep this validation the same.

dmitrig01’s picture

Status: Needs review » Fixed

fixed, thanks

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.