1*7e0e3c0cSAndrew Geissler#!/bin/sh 2*7e0e3c0cSAndrew Geissler 3*7e0e3c0cSAndrew Geissler# SPDX-FileCopyrightText: Andrei Gherzan <andrei.gherzan@huawei.com> 4*7e0e3c0cSAndrew Geissler# 5*7e0e3c0cSAndrew Geissler# SPDX-License-Identifier: MIT 6*7e0e3c0cSAndrew Geissler 7*7e0e3c0cSAndrew Geisslerset -ex 8*7e0e3c0cSAndrew Geissler 9*7e0e3c0cSAndrew Geissler# shellcheck disable=SC1091 10*7e0e3c0cSAndrew Geissler. /utils.sh 11*7e0e3c0cSAndrew Geissler 12*7e0e3c0cSAndrew GeisslerGIT_REPO_PATH="/work" 13*7e0e3c0cSAndrew Geissler 14*7e0e3c0cSAndrew Geissler[ -n "$BASE_REF" ] || 15*7e0e3c0cSAndrew Geissler error "Target branch is needed. Make sure that is set in BASE_REF." 16*7e0e3c0cSAndrew Geissler[ -d "$GIT_REPO_PATH/.git" ] || 17*7e0e3c0cSAndrew Geissler error "Can't find a git checkout under $GIT_REPO_PATH ." 18*7e0e3c0cSAndrew Geissler 19*7e0e3c0cSAndrew GeisslerTEMP_DIR="$(mktemp -d)" 20*7e0e3c0cSAndrew Geisslercd "$TEMP_DIR" 21*7e0e3c0cSAndrew Geissler 22*7e0e3c0cSAndrew GeisslerREPOS=" \ 23*7e0e3c0cSAndrew Geissler git://git.yoctoproject.org/poky.git \ 24*7e0e3c0cSAndrew Geissler" 25*7e0e3c0cSAndrew Geisslerfor repo in $REPOS; do 26*7e0e3c0cSAndrew Geissler log "Cloning $repo on branch $BASE_REF..." 27*7e0e3c0cSAndrew Geissler git clone --depth 1 --branch "$BASE_REF" "$repo" 28*7e0e3c0cSAndrew Geisslerdone 29*7e0e3c0cSAndrew Geissler 30*7e0e3c0cSAndrew Geissler# shellcheck disable=SC1091,SC2240 31*7e0e3c0cSAndrew Geissler. ./poky/oe-init-build-env build 32*7e0e3c0cSAndrew Geissleryocto-check-layer --with-software-layer-signature-check --debug \ 33*7e0e3c0cSAndrew Geissler "$GIT_REPO_PATH" 34