conan-io / conan-package-tools

Conan Package Tools. Helps with massive package creation and CI integration (Travis CI, Appveyor...)
MIT License
165 stars 70 forks source link

stable channel pattern is broken #576

Closed dvirtz closed 2 years ago

dvirtz commented 3 years ago

Description of Problem, Request, or Question

recent PR #558 breaks stable channel detection when stable_branch_pattern is passed a string

packager = ConanMultiPackager(reference="lib/1.0@",
                              stable_branch_pattern='master',
                              channel='testing',
                              ci_manager=MockCIManager(current_branch='monster'),
                              )
assert(packager.channel == 'testing') // fails

this is because the for loop in https://github.com/conan-io/conan-package-tools/blob/204a6224e7f6dc9e9d4e1f2352ee75b23989178d/cpt/packager.py#L763 results in each pattern being a character.

This used to work before this change.

Environment Details

Steps to reproduce (Include if Applicable)

git clone https://github.com/dvirtz/bugs.git cd bugs git cpt-stable-branch-pattern pip install -r requirements.txt python bug.py