1
0
Fork 0

ci: Add fallback to $CI_COMMIT_TAG for tag pipelines

The script to check out the mutter repository is missing the
case of tag pipelines, and resorts to CI_DEFAULT_BRANCH. Add
a fallback through $CI_COMMIT_TAG, so these pipelines fetch
the expected commit.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3188
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3438>
This commit is contained in:
Carlos Garnacho 2023-12-02 21:23:45 +01:00
parent edbc9a2086
commit 625a7950c4

View file

@ -32,6 +32,8 @@ variables:
if [ -n "$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME" ]; then
uri="$CI_MERGE_REQUEST_SOURCE_PROJECT_URL.git"
branch="$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME"
elif [ -n "$CI_COMMIT_TAG" ]; then
branch="$CI_COMMIT_TAG"
elif [ -n "$CI_COMMIT_BRANCH" ]; then
branch="$CI_COMMIT_BRANCH"
else