create_workspace.sh used to check out develop by default. However, this is unnecessary because the script later checks out a specific reference (which can be a commit ID, which is not accepted by git clone, the reason we don't check out during clone); the repository will simply be empty in the beginning, which should not be a problem. Further, it is problematic because we use this script for the build of the L2sim proxy, and the repository does not have develop; thus, without this modification, L2sim proxy build will always fail.
27 lines
509 B
Bash
Executable File
27 lines
509 B
Bash
Executable File
#!/bin/bash
|
|
|
|
function die() {
|
|
echo $@
|
|
exit 1
|
|
}
|
|
|
|
[ $# -ge 3 -a $# -le 4 ] || die "usage: $0 <directory> <repository> <ref> [<merge-ref>]"
|
|
|
|
set -ex
|
|
|
|
dir=$1
|
|
repo=$2
|
|
ref=$3
|
|
merge=$4
|
|
|
|
rm -rf ${dir}
|
|
git clone --filter=blob:none -n ${repo} ${dir}
|
|
cd ${dir}
|
|
git config user.email "jenkins@openairinterface.org"
|
|
git config user.name "OAI Jenkins"
|
|
git config advice.detachedHead false
|
|
mkdir -p cmake_targets/log
|
|
git checkout -f ${ref}
|
|
[ -n "${merge}" ] && git merge --ff ${merge} -m "Temporary merge for CI"
|
|
exit 0
|