Rename seen to entries and use ASCII in
This commit is contained in:
parent
f95eb15c86
commit
5e5fe3be76
@ -229,12 +229,12 @@ Returns an array of generated file/directory names.
|
|||||||
"""
|
"""
|
||||||
function gen_gitignore(pkg_dir::AbstractString, t::Template)
|
function gen_gitignore(pkg_dir::AbstractString, t::Template)
|
||||||
pkg = basename(pkg_dir)
|
pkg = basename(pkg_dir)
|
||||||
seen = mapfoldl(p -> p.gitignore, append!, values(t.plugins); init=[".DS_Store"])
|
entries = mapfoldl(p -> p.gitignore, append!, values(t.plugins); init=[".DS_Store"])
|
||||||
if !t.manifest && "Manifest.toml" ∉ seen
|
if !t.manifest && !in("Manifest.toml", entries)
|
||||||
push!(seen, "/Manifest.toml") # Only ignore manifests at the repo root.
|
push!(entries, "/Manifest.toml") # Only ignore manifests at the repo root.
|
||||||
end
|
end
|
||||||
unique!(sort!(seen))
|
unique!(sort!(entries))
|
||||||
text = join(seen, "\n")
|
text = join(entries, "\n")
|
||||||
|
|
||||||
gen_file(joinpath(pkg_dir, ".gitignore"), text)
|
gen_file(joinpath(pkg_dir, ".gitignore"), text)
|
||||||
files = [".gitignore"]
|
files = [".gitignore"]
|
||||||
|
Loading…
Reference in New Issue
Block a user