fix: fallback to cp when rsync is unavailable

This commit is contained in:
袁震
2026-04-06 14:24:28 +08:00
parent 891af1b740
commit 568d97a44a
+5 -1
View File
@@ -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 {} +
rsync -a "${DIST_DIR}/" "${work_dir}/"
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