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