wemakecustom / gitlab-composer

Gitlab Composer repository
163 stars 44 forks source link

support for custom branches #8

Closed Jimbolino closed 9 years ago

Jimbolino commented 9 years ago

https://github.com/wemakecustom/gitlab-composer/blob/master/htdocs/packages.php#L82

-        return array();
+        $version = 'dev-'.$ref['name'];

This did the trick for us.

lavoiesl commented 9 years ago

What about:

<?php
    if (preg_match('/^v?\d+\.\d+(\.\d+)*(\-(dev|patch|alpha|beta|RC)\d*)?$/', $ref['name'])) {
        $version = $ref['name'];
    } else {
        $version = 'dev-' . $ref['name'];
    }
?>
Jimbolino commented 9 years ago

even better :)