Skip to content
Snippets Groups Projects

build-env: Guess again target release from branch name

Merged Emanuele Aina requested to merge wip/em/re-add-target-branch-guessing into master
+ 5
0
@@ -195,6 +195,11 @@ prepare-build-env:
- apt-get update
- apt-get install -y --no-install-recommends dpkg-dev
- BRANCH=$CI_DEFAULT_BRANCH
- |
if GUESS=$(echo "$CI_COMMIT_BRANCH" | grep -o 'v[0-9]\{4\}\(dev[0-9]\|pre\|-security\|-updates\|-backports\)\?')
then
BRANCH=$OSNAME/$GUESS # wip/foo/blah-blah-v2022-updates-blah → apertis/2022-updates
fi
- case "$CI_COMMIT_BRANCH" in $OSNAME/*) BRANCH=$CI_COMMIT_BRANCH;; esac
- case "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" in $OSNAME/*) BRANCH=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME;; esac
- RELEASE_AND_SECTION=${BRANCH##*/} # apertis/v2022-updates → v2022-updates
Loading