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[]
|
||||
end
|
||||
|
||||
text = "Copyright (c) $(Dates.year(Dates.now())) $(t.authors)\n"
|
||||
text = "Copyright (c) $(year(today())) $(t.authors)\n"
|
||||
text *= read_license(t.license)
|
||||
|
||||
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",
|
||||
),
|
||||
],
|
||||
Dict{String, Any}("YEAR" => Dates.year(Dates.today())),
|
||||
Dict{String, Any}("YEAR" => year(today())),
|
||||
)
|
||||
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
|
||||
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
|
||||
config template file doesn't follow the generic naming convention, we added another
|
||||
`interactive` method to correct the assumed filename.
|
||||
substitutions with one addition: `{{YEAR}} => year(today())`. Since the default config
|
||||
template file doesn't follow the generic naming convention, we added another `interactive`
|
||||
method to correct the assumed filename.
|
||||
"""
|
||||
abstract type GenericPlugin <: Plugin end
|
||||
|
||||
|
@ -106,7 +106,7 @@ function Base.show(io::IO, t::Template)
|
||||
if isempty(t.license)
|
||||
println(io, "None")
|
||||
else
|
||||
println(io, "$(t.license) ($(t.authors) $(Dates.year(Dates.now())))")
|
||||
println(io, "$(t.license) ($(t.authors) $(year(today())))")
|
||||
end
|
||||
|
||||
println(io, "$spc→ Package directory: $(replace(maybe(t.dir), homedir() => "~"))")
|
||||
|
@ -114,7 +114,7 @@ end
|
||||
Template:
|
||||
→ User: $me
|
||||
→ Host: github.com
|
||||
→ License: MIT ($(LibGit2.getconfig("user.name", "")) $(Dates.year(now())))
|
||||
→ License: MIT ($(LibGit2.getconfig("user.name", "")) $(year(today())))
|
||||
→ Package directory: $pkg_dir
|
||||
→ Minimum Julia version: v$(PkgTemplates.version_floor())
|
||||
→ SSH remote: No
|
||||
|
Loading…
Reference in New Issue
Block a user