doGitLabMerge.sh 575 Bytes
Newer Older
1 2
#!/bin/bash

OAI Jenkins's avatar
OAI Jenkins committed
3 4 5 6 7 8
if [ $# -ne 4 ]
then
    echo "Syntax Error: $0 src-branch src-commit-id dest-branch dest-commit-id"
    exit 1
fi

9
SOURCE_BRANCH=$1
OAI Jenkins's avatar
OAI Jenkins committed
10 11 12 13
echo "Source Branch is    : $SOURCE_BRANCH"

SOURCE_COMMIT_ID=$2
echo "Source Commit ID is : $SOURCE_COMMIT_ID"
14

OAI Jenkins's avatar
OAI Jenkins committed
15 16
TARGET_BRANCH=$3
echo "Target Branch is    : $TARGET_BRANCH"
17

OAI Jenkins's avatar
OAI Jenkins committed
18 19
TARGET_COMMIT_ID=$4
echo "Target Commit ID is : $TARGET_COMMIT_ID"
20 21 22 23

git config user.email "jenkins@openairinterface.org"
git config user.name "OAI Jenkins"

OAI Jenkins's avatar
OAI Jenkins committed
24
git checkout -f $SOURCE_COMMIT_ID
25 26

git merge --ff $TARGET_COMMIT_ID -m "Temporary merge for CI"
OAI Jenkins's avatar
OAI Jenkins committed
27