From 339f2c34abc7d5166eb6b0035d143ddf4c271ede Mon Sep 17 00:00:00 2001 From: KodouWZF <3092554823@qq.com> Date: Wed, 4 Nov 2026 21:44:54 +0800 Subject: [PATCH] =?UTF-8?q?chore(git):=20=E9=95=9C=E5=83=8F=20tar=20?= =?UTF-8?q?=E4=B8=8E=20demo/=20=E5=8E=86=E5=8F=B2=E6=8B=B7=E8=B4=9D?= =?UTF-8?q?=E4=B8=8D=E8=BF=9B=E6=B0=94=E4=BB=93=EF=BC=8C.gitattributes=20?= =?UTF-8?q?=E9=94=81=20LF=20=E8=A1=8C=E5=B0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 34 ++++++++++++++++++++++++++++++++++ .gitignore | 9 +++++++++ deploy/.gitignore | 3 +++ 3 files changed, 46 insertions(+) create mode 100644 .gitattributes create mode 100644 deploy/.gitignore diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..d937b0d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,34 @@ +# ============================================================================= +# 行尾与二进制规则 +# +# 交付包最终在 Linux 服务器上跑:脚本带 CRLF 时 bash 第一行就报错(\r 被当成参数), +# .env / compose 的值尾部带 \r 会让口令、JWT、镜像 tag 对不上且极难排查。 +# 构建这台机器是 Windows,所以这里把「Linux 上会被读取的文本」显式锁成 LF。 +# ============================================================================= + +*.sh text eol=lf +*.yml text eol=lf +*.yaml text eol=lf +*.sql text eol=lf +*.conf text eol=lf +*.template text eol=lf +*.properties text eol=lf +Dockerfile* text eol=lf +.env text eol=lf +.env.* text eol=lf + +# 镜像 tar 与二进制资源:禁止任何换行转换,否则 sha256 与内容都会坏掉 +*.tar binary +*.tar.gz binary +*.gz binary +*.zip binary +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.ico binary +*.woff binary +*.woff2 binary +*.ttf binary +*.eot binary +*.pdf binary diff --git a/.gitignore b/.gitignore index fc1d678..db1a032 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,12 @@ *.log .idea/ .vscode/ + +# 镜像 tar 是出盘产物(单个 300M+),一律不进气仓,只走交付盘 +*.tar + +# 出包时的镜像暂存目录 +deployment/.stage-images-*/ + +# 客户历史现场拷贝(含整份 postgres_data 与镜像 tar),只作本地参考不入库 +demo/ diff --git a/deploy/.gitignore b/deploy/.gitignore new file mode 100644 index 0000000..fe8500a --- /dev/null +++ b/deploy/.gitignore @@ -0,0 +1,3 @@ +# 本机 demo 的镜像 tar 是出盘产物(约 664MB),不进 git +images/*.tar +images/SHA256SUMS.txt