chore(git): 镜像 tar 与 demo/ 历史拷贝不进气仓,.gitattributes 锁 LF 行尾
This commit is contained in:
34
.gitattributes
vendored
Normal file
34
.gitattributes
vendored
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user