wemakecustom/gitlab-composer

support for custom branches

Closed this issue · 2 comments

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

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

This did the trick for us.

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'];
    }
?>

even better :)