Commit ec6c8806 authored by Robert Speicher's avatar Robert Speicher

Merge branch '240887-packages-composer-semver-not-fully-supported' into 'master'

Resolve "Packages/composer: semver not fully supported"

See merge request gitlab-org/gitlab!46301
parents b1ac5ff5 5abafc5f
...@@ -9,7 +9,7 @@ module Packages ...@@ -9,7 +9,7 @@ module Packages
def execute def execute
if @tag_name.present? if @tag_name.present?
@tag_name.match(Gitlab::Regex.composer_package_version_regex).captures[0] @tag_name.delete_prefix('v')
elsif @branch_name.present? elsif @branch_name.present?
branch_sufix_or_prefix(@branch_name.match(Gitlab::Regex.composer_package_version_regex)) branch_sufix_or_prefix(@branch_name.match(Gitlab::Regex.composer_package_version_regex))
end end
......
---
title: Allow semver versions in composer packages
merge_request: 46301
author:
type: fixed
...@@ -19,9 +19,11 @@ RSpec.describe Packages::Composer::VersionParserService do ...@@ -19,9 +19,11 @@ RSpec.describe Packages::Composer::VersionParserService do
nil | '1.7.x' | '1.7.x-dev' nil | '1.7.x' | '1.7.x-dev'
'v1.0.0' | nil | '1.0.0' 'v1.0.0' | nil | '1.0.0'
'v1.0' | nil | '1.0' 'v1.0' | nil | '1.0'
'v1.0.1+meta' | nil | '1.0.1+meta'
'1.0' | nil | '1.0' '1.0' | nil | '1.0'
'1.0.2' | nil | '1.0.2' '1.0.2' | nil | '1.0.2'
'1.0.2-beta2' | nil | '1.0.2-beta2' '1.0.2-beta2' | nil | '1.0.2-beta2'
'1.0.1+meta' | nil | '1.0.1+meta'
end end
with_them do with_them do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment