fix: normalize web release asset permissions

This commit is contained in:
kdletters
2026-06-02 11:51:37 +08:00
parent 2fdeb34567
commit dbe4c902b4
3 changed files with 10 additions and 0 deletions

View File

@@ -400,6 +400,10 @@ if [[ "${BUILD_WEB}" -eq 1 ]]; then
MAINTENANCE_HTML
fi
echo "[production-release] 规范 Web 静态资源权限"
find "${WEB_DIR}" -type d -exec chmod 755 {} +
find "${WEB_DIR}" -type f -exec chmod 644 {} +
echo "[production-release] 打包 Web 静态资源 -> ${TARGET_DIR}/web.tar.gz"
tar -czf "${TARGET_DIR}/web.tar.gz" -C "${TARGET_DIR}" web
write_sha256_file "${TARGET_DIR}/web.tar.gz"

View File

@@ -98,6 +98,10 @@ echo "[production-web-deploy] 解压 Web 到: ${WEB_TARGET}"
tar -xzf "${SOURCE_DIR}/web.tar.gz" -C "${RELEASE_DIR}"
test -d "${WEB_TARGET}"
echo "[production-web-deploy] 规范 Web 静态资源权限"
find "${WEB_TARGET}" -type d -exec chmod 755 {} +
find "${WEB_TARGET}" -type f -exec chmod 644 {} +
if [[ -f "${SOURCE_DIR}/release-manifest.json" ]]; then
cp "${SOURCE_DIR}/release-manifest.json" "${RELEASE_DIR}/release-manifest.web.json"
fi