Skip to content
Snippets Groups Projects
Commit 87742abd authored by jurgenhaas's avatar jurgenhaas
Browse files

gitlab-ci-cd/drupal#57 The target branch for the merge script is now...

gitlab-ci-cd/drupal#57 The target branch for the merge script is now "release", if it exists, otherwise "main"
parent 574e4910
No related branches found
No related tags found
1 merge request!54Merging develop into main
......@@ -6,7 +6,14 @@ if [[ "x$TARGETBRANCH" == "x" ]]; then
echo "Main branch can not be merged."
exit 1
elif [[ "$SOURCEBRANCH" == "develop" ]]; then
TARGETBRANCH=main
# Check if remote branch "release" exists.
EC=0
git rev-parse --quiet --verify origin/release >/dev/null || EC=$?
if [[ $EC -eq 0 ]]; then
TARGETBRANCH=release
else
TARGETBRANCH=main
fi
else
TARGETBRANCH=develop
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment