better .gitattributes (#680)

* better .gitattributes

* .gitattributes per directory

* No binary file detection

https://stackoverflow.com/questions/57030698

* fix .github/actions/*/*.yml
This commit is contained in:
Imple Lee
2022-04-04 12:28:42 +08:00
committed by GitHub
parent bdb117c0df
commit 9426dcdc69
6 changed files with 33 additions and 37 deletions

9
.gitattributes vendored
View File

@@ -1,10 +1 @@
* text=auto
.lua text eol=crlf
.glsl text eol=crlf
.txt text eol=crlf
.md text eol=crlf
*.ogg binary
*.png binary
*.jpg binary

2
.github/.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
actions/**/*.yml text eol=lf
workflows/*.yml text eol=lf

1
.github/build/Linux/.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
*.template text eol=lf

1
.github/build/Windows/.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
*.template text eol=crlf

1
.github/build/macOS/.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
*.template text eol=lf

View File

@@ -1,28 +1,28 @@
local arg=arg[1]
if arg=="-apkCode"then
local code=require"version".apkCode
print(code)
elseif arg=="-code"then
local str=require"version".code
print(str)
elseif arg=="-name"then
local str=require"version".string
print(str)
elseif arg=="-release"then
local str=require"version".string:gsub("V","",1)
print(str)
elseif arg=="-updateTitle"then
local note=require"parts.updateLog"
local p1=note:find("\n%d")+1
local p2=note:find("\n",p1)-1
note=note:sub(p1,p2)
print(note)
elseif arg=="-updateNote"then
local note=require"parts.updateLog"
local p1=note:find("\n",note:find("\n%d")+1)+1
local p2=note:find("\n%d",p1+1)
note=note:sub(p1,p2-2)
:gsub(" ","- ")
:gsub(" ","# ")
print(note)
end
local arg=arg[1]
if arg=="-apkCode"then
local code=require"version".apkCode
print(code)
elseif arg=="-code"then
local str=require"version".code
print(str)
elseif arg=="-name"then
local str=require"version".string
print(str)
elseif arg=="-release"then
local str=require"version".string:gsub("V","",1)
print(str)
elseif arg=="-updateTitle"then
local note=require"parts.updateLog"
local p1=note:find("\n%d")+1
local p2=note:find("\n",p1)-1
note=note:sub(p1,p2)
print(note)
elseif arg=="-updateNote"then
local note=require"parts.updateLog"
local p1=note:find("\n",note:find("\n%d")+1)+1
local p2=note:find("\n%d",p1+1)
note=note:sub(p1,p2-2)
:gsub(" ","- ")
:gsub(" ","# ")
print(note)
end