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

Extension does not support -dev release #46

Closed
codebymikey opened this issue Oct 9, 2020 · 2 comments
Closed

Extension does not support -dev release #46

codebymikey opened this issue Oct 9, 2020 · 2 comments
Milestone

Comments

@codebymikey
Copy link
Contributor

The regex at

$result = preg_match("/<p id=\"version\">CiviProxy Version ([0-9]+\.[0-9]+|[0-9]+\.[0-9]+\.[0-9]+)<\/p>/", $response, $output_array);
if ($result === FALSE || $result === 0){
return array('is_error' => 1, 'message' => sprintf(ts('Error: failed to parse version information'), $url));
}else{
return array('is_error' => 0, 'version' => $output_array[1]);
}
does not match dev releases such as "CiviProxy Version 0.6-dev" which is the current latest version.

@bjendres
Copy link
Member

That's a good point. @codebymikey Care to provide a PR?

@bjendres bjendres added this to the 0.6 milestone Oct 12, 2020
codebymikey added a commit to codebymikey/CiviProxy that referenced this issue Oct 12, 2020
systopia#46 Add ability to match pre-releases and build labels e.g. "-dev"
@codebymikey
Copy link
Contributor Author

Made a PR, the regex could be simplified to (([0-9]+(\.[0-9]+){1,2})(?:-[0-9A-Za-z-]+)?), but that's up to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants