更新脚本修改

This commit is contained in:
谢宇宁
2026-11-07 20:20:51 +07:00
parent 4d4e635587
commit a7ba7c8057
2 changed files with 13 additions and 3 deletions
+11 -1
View File
@@ -29,7 +29,17 @@ LINUX_DIST="$DIR/dist/production-linux-x64-glibc"
[ -d "$LINUX_DIST" ] || fail "构建产物 $LINUX_DIST 不存在"
echo "[3/5] 生成 tar.gz 和 SHA-256..."
(cd "$LINUX_DIST" && tar --no-xattrs --exclude='.DS_Store' --exclude='node_modules/@img/sharp-darwin-arm64' --exclude='node_modules/@img/sharp-libvips-darwin-arm64' -czf "$STAGE/$PACKAGE_NAME" --owner=0 --group=0 .)
# 属主统一为 root:GNU tar 用 --owner/--group,macOS 自带 bsdtar 用 --uid/--gid。
if tar --version 2>/dev/null | grep -q 'GNU tar'; then
TAR_OWNER_FLAGS=(--owner=0 --group=0)
else
TAR_OWNER_FLAGS=(--uid 0 --gid 0)
fi
(cd "$LINUX_DIST" && COPYFILE_DISABLE=1 COPY_EXTENDED_ATTRIBUTES_DISABLE=1 tar --no-xattrs "${TAR_OWNER_FLAGS[@]}" \
--exclude='.DS_Store' --exclude='._*' \
--exclude='node_modules/@img/sharp-darwin-arm64' --exclude='node_modules/@img/sharp-libvips-darwin-arm64' \
-czf "$STAGE/$PACKAGE_NAME" .)
tar -tzf "$STAGE/$PACKAGE_NAME" >/dev/null || fail "压缩包校验失败"
(cd "$STAGE" && shasum -a 256 "$PACKAGE_NAME" > "$PACKAGE_NAME.sha256")
ls -lh "$STAGE/$PACKAGE_NAME" "$STAGE/$PACKAGE_NAME.sha256"
+2 -2
View File
@@ -1,7 +1,7 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next-dev/dev/types/routes.d.ts";
import "./.next-dev/dev/types/root-params.d.ts";
import "./.next/types/routes.d.ts";
import "./.next/types/root-params.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.