support/scripts: prioritize conditions for pipeline creation
authorYann E. MORIN <yann.morin.1998@free.fr>
Mon, 21 Sep 2020 21:08:41 +0000 (23:08 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 22 Sep 2020 19:29:39 +0000 (21:29 +0200)
commit245a64c3873a5061f6c75a2bc00b2b234701548f
treee1b076f0b5b001b4a61e1712447331352b91cb26
parent48f0548ab312d93729b9f89f819c026d7ab7587e
support/scripts: prioritize conditions for pipeline creation

When multiple conditions match simultaneously, even though that should
not happen in practice, we want the more "important" one to win over
the less "important" ones. For example, a tag is more important than a
branch name or a trigger.

Currently, the latest condition to match takes precendence over any
previous one, while we want the exact opposite.

Fix that with proper fallbacks in else-blocks.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
support/scripts/generate-gitlab-ci-yml