Use AutoHashEquals
This commit is contained in:
parent
9d725f4316
commit
b4731273a0
@ -1,6 +1,6 @@
|
|||||||
module PkgTemplates
|
module PkgTemplates
|
||||||
|
|
||||||
import Base.==
|
using AutoHashEquals
|
||||||
using Mustache
|
using Mustache
|
||||||
using URIParser
|
using URIParser
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ Add AppVeyor to a template's plugins to add AppVeyor CI support.
|
|||||||
* `config_file::Union{AbstractString, Void}`: Path to a custom `.appveyor.yml`.
|
* `config_file::Union{AbstractString, Void}`: Path to a custom `.appveyor.yml`.
|
||||||
If `nothing` is supplied, then no file will be generated.
|
If `nothing` is supplied, then no file will be generated.
|
||||||
"""
|
"""
|
||||||
struct AppVeyor <: Plugin
|
@auto_hash_equals struct AppVeyor <: Plugin
|
||||||
gitignore_files::Vector{AbstractString}
|
gitignore_files::Vector{AbstractString}
|
||||||
config_file::Union{AbstractString, Void}
|
config_file::Union{AbstractString, Void}
|
||||||
|
|
||||||
@ -24,11 +24,6 @@ struct AppVeyor <: Plugin
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function ==(a::AppVeyor, b::AppVeyor)
|
|
||||||
return a.gitignore_files == b.gitignore_files &&
|
|
||||||
a.config_file == b.config_file
|
|
||||||
end
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
badges(plugin::AppVeyor, pkg_name::AbstractString, t::Template) -> Vector{String}
|
badges(plugin::AppVeyor, pkg_name::AbstractString, t::Template) -> Vector{String}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ Add CodeCov to a template's plugins to enable CodeCov coverage reports.
|
|||||||
* `config_file::AbstractString`: Path to a custom `.codecov.yml`.
|
* `config_file::AbstractString`: Path to a custom `.codecov.yml`.
|
||||||
If `nothing` is supplied, then no file will be generated.
|
If `nothing` is supplied, then no file will be generated.
|
||||||
"""
|
"""
|
||||||
struct CodeCov <: Plugin
|
@auto_hash_equals struct CodeCov <: Plugin
|
||||||
gitignore_files::Vector{AbstractString}
|
gitignore_files::Vector{AbstractString}
|
||||||
config_file::AbstractString
|
config_file::AbstractString
|
||||||
|
|
||||||
@ -24,11 +24,6 @@ struct CodeCov <: Plugin
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function ==(a::CodeCov, b::CodeCov)
|
|
||||||
return a.gitignore_files == b.gitignore_files &&
|
|
||||||
a.config_file == b.config_file
|
|
||||||
end
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
badges(plugin::CodeCov, pkg_name::AbstractString, t::Template) -> Vector{String}
|
badges(plugin::CodeCov, pkg_name::AbstractString, t::Template) -> Vector{String}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ Add GitHubPages to a template's plugins to add Documenter.jl support via GitHub
|
|||||||
* `documenter_assets::Vector{String}=String[]`: Array of paths to Documenter asset files.
|
* `documenter_assets::Vector{String}=String[]`: Array of paths to Documenter asset files.
|
||||||
"""
|
"""
|
||||||
struct GitHubPages <: Documenter
|
struct GitHubPages <: Documenter
|
||||||
|
@auto_hash_equals struct GitHubPages <: Documenter
|
||||||
gitignore_files::Vector{AbstractString}
|
gitignore_files::Vector{AbstractString}
|
||||||
documenter_assets::Vector{AbstractString}
|
documenter_assets::Vector{AbstractString}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ Add TravisCI to a template's plugins to add Travis CI support.
|
|||||||
* `config_file::AbstractString`: Path to a custom `.travis.yml`.
|
* `config_file::AbstractString`: Path to a custom `.travis.yml`.
|
||||||
If `nothing` is supplied, then no file will be generated.
|
If `nothing` is supplied, then no file will be generated.
|
||||||
"""
|
"""
|
||||||
struct TravisCI <: Plugin
|
@auto_hash_equals struct TravisCI <: Plugin
|
||||||
gitignore_files::Vector{AbstractString}
|
gitignore_files::Vector{AbstractString}
|
||||||
config_file::Union{AbstractString, Void}
|
config_file::Union{AbstractString, Void}
|
||||||
|
|
||||||
@ -24,11 +24,6 @@ struct TravisCI <: Plugin
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function ==(a::TravisCI, b::TravisCI)
|
|
||||||
return a.gitignore_files == b.gitignore_files &&
|
|
||||||
a.config_file == b.config_file
|
|
||||||
end
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
badges(plugin::TravisCI, pkg_name::AbstractString, t::Template) -> Vector{String}
|
badges(plugin::TravisCI, pkg_name::AbstractString, t::Template) -> Vector{String}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ Records common information used to generate a package.
|
|||||||
* `git_config::Dict{String, String}=Dict{String, String}()`: Git configuration options.
|
* `git_config::Dict{String, String}=Dict{String, String}()`: Git configuration options.
|
||||||
* `plugins::Vector{Plugin}`: A list of `Plugin`s that the package will include.
|
* `plugins::Vector{Plugin}`: A list of `Plugin`s that the package will include.
|
||||||
"""
|
"""
|
||||||
struct Template
|
@auto_hash_equals struct Template
|
||||||
remote_prefix::AbstractString
|
remote_prefix::AbstractString
|
||||||
license::Union{AbstractString, Void}
|
license::Union{AbstractString, Void}
|
||||||
authors::Union{AbstractString, Array}
|
authors::Union{AbstractString, Array}
|
||||||
|
Loading…
Reference in New Issue
Block a user