fix: fallback to cp when rsync is unavailable
This commit is contained in:
@@ -23,7 +23,11 @@ work_dir="${tmp_dir}/release"
|
||||
git clone --branch "${TARGET_BRANCH}" --single-branch "${RELEASE_REPO_URL}" "${work_dir}" >/dev/null
|
||||
|
||||
find "${work_dir}" -mindepth 1 -maxdepth 1 ! -name '.git' -exec rm -rf {} +
|
||||
if command -v rsync >/dev/null 2>&1; then
|
||||
rsync -a "${DIST_DIR}/" "${work_dir}/"
|
||||
else
|
||||
cp -a "${DIST_DIR}/." "${work_dir}/"
|
||||
fi
|
||||
|
||||
cd "${work_dir}"
|
||||
git add -A
|
||||
|
||||
Reference in New Issue
Block a user