Skip to content
Snippets Groups Projects
Commit 6edf4001 authored by jurgenhaas's avatar jurgenhaas
Browse files

Improving merge script

parent 291a0941
No related branches found
No related tags found
3 merge requests!43Merging develop into main,!42Merging develop into main,!41Merging develop into main
#!/bin/bash
set -e
SOURCEBRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ "x$TARGETBRANCH" == "x" ]]; then
if [[ "$SOURCEBRANCH" == "main" ]]; then
......@@ -29,6 +27,11 @@ if [[ "$1" == "major" ]]; then
TITLE="${TITLE} [MAJOR_VERSION]"
fi
glab mr create --fill --yes --source-branch ${SOURCEBRANCH} --target-branch ${TARGETBRANCH} --title "$TITLE"
sleep 5
rm /tmp/glab.log || true
glab mr create --fill --yes --source-branch ${SOURCEBRANCH} --target-branch ${TARGETBRANCH} --title "$TITLE" > /tmp/glab.log
EC=0
grep "Failed to create merge request." /tmp/glab.log || EC=$?
if [[ $EC -neq 0 ]]; then glab mr create --recover; fi
sleep 5
glab mr merge --yes ${SOURCEBRANCH}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment