Functions in Dates are exported
This commit is contained in:
parent
e47672bff1
commit
b55dc64ff1
@ -210,7 +210,7 @@ function gen_license(pkg_dir::AbstractString, t::Template)
|
|||||||
return String[]
|
return String[]
|
||||||
end
|
end
|
||||||
|
|
||||||
text = "Copyright (c) $(Dates.year(Dates.now())) $(t.authors)\n"
|
text = "Copyright (c) $(year(today())) $(t.authors)\n"
|
||||||
text *= read_license(t.license)
|
text *= read_license(t.license)
|
||||||
|
|
||||||
gen_file(joinpath(pkg_dir, "LICENSE"), text)
|
gen_file(joinpath(pkg_dir, "LICENSE"), text)
|
||||||
|
@ -51,7 +51,7 @@ Generic plugins are plugins that add any number of patterns to the generated pac
|
|||||||
"https://myplugin.com/{{USER}}/{{PKGNAME}}.jl",
|
"https://myplugin.com/{{USER}}/{{PKGNAME}}.jl",
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
Dict{String, Any}("YEAR" => Dates.year(Dates.today())),
|
Dict{String, Any}("YEAR" => year(today())),
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -61,9 +61,9 @@ interactive(::Type{MyPlugin}) = interactive(MyPlugin; file="my-plugin.toml")
|
|||||||
|
|
||||||
The above plugin ignores files ending with `.mgp`, copies `defaults/my-plugin.toml` by
|
The above plugin ignores files ending with `.mgp`, copies `defaults/my-plugin.toml` by
|
||||||
default, and creates a badge that links to the project on its own site, using the default
|
default, and creates a badge that links to the project on its own site, using the default
|
||||||
substitutions with one addition: `{{YEAR}} => Dates.year(Dates.today())`. Since the default
|
substitutions with one addition: `{{YEAR}} => year(today())`. Since the default config
|
||||||
config template file doesn't follow the generic naming convention, we added another
|
template file doesn't follow the generic naming convention, we added another `interactive`
|
||||||
`interactive` method to correct the assumed filename.
|
method to correct the assumed filename.
|
||||||
"""
|
"""
|
||||||
abstract type GenericPlugin <: Plugin end
|
abstract type GenericPlugin <: Plugin end
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ function Base.show(io::IO, t::Template)
|
|||||||
if isempty(t.license)
|
if isempty(t.license)
|
||||||
println(io, "None")
|
println(io, "None")
|
||||||
else
|
else
|
||||||
println(io, "$(t.license) ($(t.authors) $(Dates.year(Dates.now())))")
|
println(io, "$(t.license) ($(t.authors) $(year(today())))")
|
||||||
end
|
end
|
||||||
|
|
||||||
println(io, "$spc→ Package directory: $(replace(maybe(t.dir), homedir() => "~"))")
|
println(io, "$spc→ Package directory: $(replace(maybe(t.dir), homedir() => "~"))")
|
||||||
|
@ -114,7 +114,7 @@ end
|
|||||||
Template:
|
Template:
|
||||||
→ User: $me
|
→ User: $me
|
||||||
→ Host: github.com
|
→ Host: github.com
|
||||||
→ License: MIT ($(LibGit2.getconfig("user.name", "")) $(Dates.year(now())))
|
→ License: MIT ($(LibGit2.getconfig("user.name", "")) $(year(today())))
|
||||||
→ Package directory: $pkg_dir
|
→ Package directory: $pkg_dir
|
||||||
→ Minimum Julia version: v$(PkgTemplates.version_floor())
|
→ Minimum Julia version: v$(PkgTemplates.version_floor())
|
||||||
→ SSH remote: No
|
→ SSH remote: No
|
||||||
|
Loading…
Reference in New Issue
Block a user