summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2021-02-18 14:49:41 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2021-02-18 14:52:32 +0530
commit2c0ab5f8a1756c5a2c8d1e192dcd87da6c9dba48 (patch)
treef4eb99b9ebce245e64cb32d7c100f77454c2b03d
parent2cd6f5f6b9051eda49f97513b178343f12333c57 (diff)
gitlab/cerbero: Don't fail when there's no macOS cache
`test -d "${CERBERO_HOME}/dist/${ARCH}"` will cause the build to error out if the dist dir doesn't exist, which will happen if there's no cache, for example: https://gitlab.freedesktop.org/seungha.yang/gst-plugins-bad/-/jobs/7405565 What we actually want to do, is to not perform the rsync if there's no cache, since it means we want to rebuild from scratch; for instance, if the current MR uses a custom cerbero branch of the same name which won't have a prebuilt cache. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/398>
-rw-r--r--gitlab/cerbero_setup.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/gitlab/cerbero_setup.sh b/gitlab/cerbero_setup.sh
index 4fd7cea..fbf164f 100644
--- a/gitlab/cerbero_setup.sh
+++ b/gitlab/cerbero_setup.sh
@@ -126,8 +126,7 @@ cerbero_script() {
$CERBERO $CERBERO_ARGS fetch-cache --branch "${GST_UPSTREAM_BRANCH}"
- if [[ -n ${CERBERO_OVERRIDDEN_DIST_DIR} ]]; then
- test -d "${CERBERO_HOME}/dist/${ARCH}"
+ if [[ -n ${CERBERO_OVERRIDDEN_DIST_DIR} && -d "${CERBERO_HOME}/dist/${ARCH}" ]]; then
mkdir -p "${CERBERO_OVERRIDDEN_DIST_DIR}"
time rsync -aH "${CERBERO_HOME}/dist/${ARCH}/" "${CERBERO_OVERRIDDEN_DIST_DIR}"
fi