Fixed directory creation issues in build_ios_framework.sh
This commit is contained in:
parent
763bc8c71c
commit
3e90e8d464
|
@ -124,7 +124,7 @@ function build_ios_frameworks_and_libraries {
|
||||||
|
|
||||||
function create_framework_archive {
|
function create_framework_archive {
|
||||||
# Change to the Bazel iOS output directory.
|
# Change to the Bazel iOS output directory.
|
||||||
pushd "${BAZEL_IOS_OUTDIR}"
|
pushd "${MPP_ROOT_DIR}"
|
||||||
|
|
||||||
# Create the temporary directory for the given framework.
|
# Create the temporary directory for the given framework.
|
||||||
local ARCHIVE_NAME="${FRAMEWORK_NAME}-${MPP_BUILD_VERSION}"
|
local ARCHIVE_NAME="${FRAMEWORK_NAME}-${MPP_BUILD_VERSION}"
|
||||||
|
@ -165,9 +165,9 @@ function create_framework_archive {
|
||||||
|
|
||||||
#----- (3) Move the framework to the destination -----
|
#----- (3) Move the framework to the destination -----
|
||||||
if [[ "${ARCHIVE_FRAMEWORK}" == true ]]; then
|
if [[ "${ARCHIVE_FRAMEWORK}" == true ]]; then
|
||||||
local TARGET_DIR="$(realpath "${FRAMEWORK_NAME}")"
|
|
||||||
|
|
||||||
# Create the framework archive directory.
|
# Create the framework archive directory.
|
||||||
|
mkdir -p "${FRAMEWORK_NAME}"
|
||||||
|
local TARGET_DIR="$(realpath "${FRAMEWORK_NAME}")"
|
||||||
|
|
||||||
local FRAMEWORK_ARCHIVE_DIR
|
local FRAMEWORK_ARCHIVE_DIR
|
||||||
if [[ "${IS_RELEASE_BUILD}" == true ]]; then
|
if [[ "${IS_RELEASE_BUILD}" == true ]]; then
|
||||||
|
@ -186,8 +186,11 @@ function create_framework_archive {
|
||||||
mv "${MPP_ARCHIVE_FILE}" "${FRAMEWORK_ARCHIVE_DIR}"
|
mv "${MPP_ARCHIVE_FILE}" "${FRAMEWORK_ARCHIVE_DIR}"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Move the target directory to the Kokoro artifacts directory.
|
# Move the target directory to the Kokoro artifacts directory and clean up
|
||||||
mv "${TARGET_DIR}" "$(realpath "${DEST_DIR}")"/
|
# the artifacts directory in the mediapipe root directory even if the
|
||||||
|
# move command fails.
|
||||||
|
mv "${TARGET_DIR}" "$(realpath "${DEST_DIR}")"/ || true
|
||||||
|
rm -rf "${TARGET_DIR}"
|
||||||
else
|
else
|
||||||
rsync -r "${MPP_TMPDIR}/" "$(realpath "${DEST_DIR}")/"
|
rsync -r "${MPP_TMPDIR}/" "$(realpath "${DEST_DIR}")/"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user