skia2/infra/pathkit/build_pathkit.sh
Kevin Lubick 902d2bcad6 [infra] Cleanup permissions in our docker build tasks
Swarming appears to have changed recently to fail loudly
if it cannot delete any files. This can happen for
our docker outputs (e.g. the /OUT/obj folder).

I am hopeful that in a Bazel world, we won't have
issues like this because of Bazel's ability to keep
things more hermetic.

Change-Id: I21d9138bc25b42794006322e1b8987787222d5da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436816
Reviewed-by: Eric Boren <borenet@google.com>
2021-08-05 12:33:10 +00:00

29 lines
844 B
Bash
Executable File

#!/bin/bash
# Copyright 2018 Google LLC
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This assumes it is being run inside a docker container of emsdk-base
# and a Skia checkout has been mounted at /SRC and the output directory
# is mounted at /OUT
set +e
set -x
# Clean out previous builds (ignoring any errors for things like folders)
# (e.g. we don't want to delete /OUT/depot_tools/)
rm -f /OUT/*
# We want to clean out previously generated code and object files to avoid
# previous builds contaminating this one.
rm -rf /OUT/gen
rm -rf /OUT/obj
set -e
#BASE_DIR is the dir this script is in ($SKIA_ROOT/infra/pathkit)
BASE_DIR=`cd $(dirname ${BASH_SOURCE[0]}) && pwd`
PATHKIT_DIR=$BASE_DIR/../../modules/pathkit
BUILD_DIR=/OUT $PATHKIT_DIR/compile.sh $@
chmod -R 0777 /OUT/*