Use absolute paths for plugin files
This commit is contained in:
parent
d9c5ad6905
commit
bca98117ec
@ -30,9 +30,11 @@ Generic plugins are plugins that add any number of patterns to the generated pac
|
||||
|
||||
function MyPlugin(; config_file::Union{AbstractString, Void}="")
|
||||
if config_file != nothing
|
||||
if isempty(config_file)
|
||||
config_file = joinpath(DEFAULTS_DIR, "my-plugin.toml")
|
||||
elseif !isfile(config_file)
|
||||
config_file = if isempty(config_file)
|
||||
joinpath(DEFAULTS_DIR, "my-plugin.toml")
|
||||
elseif isfile(config_file)
|
||||
abspath(config_file)
|
||||
else
|
||||
throw(ArgumentError(
|
||||
"File \$(abspath(config_file)) does not exist"
|
||||
))
|
||||
|
@ -17,9 +17,11 @@ generated repositories, and an appropriate badge to the README.
|
||||
|
||||
function AppVeyor(; config_file::Union{AbstractString, Void}="")
|
||||
if config_file != nothing
|
||||
if isempty(config_file)
|
||||
config_file = if isempty(config_file)
|
||||
config_file = joinpath(DEFAULTS_DIR, "appveyor.yml")
|
||||
elseif !isfile(config_file)
|
||||
elseif isfile(config_file)
|
||||
abspath(config_file)
|
||||
else
|
||||
throw(ArgumentError("File $(abspath(config_file)) does not exist"))
|
||||
end
|
||||
end
|
||||
|
@ -18,9 +18,11 @@ generated repositories, and an appropriate badge to the README. Also updates the
|
||||
|
||||
function CodeCov(; config_file::Union{AbstractString, Void}="")
|
||||
if config_file != nothing
|
||||
if isempty(config_file)
|
||||
config_file = if isempty(config_file)
|
||||
config_file = joinpath(DEFAULTS_DIR, "codecov.yml")
|
||||
elseif !isfile(config_file)
|
||||
elseif isfile(config_file)
|
||||
abspath(config_file)
|
||||
else
|
||||
throw(ArgumentError("File $(abspath(config_file)) does not exist"))
|
||||
end
|
||||
end
|
||||
|
@ -17,8 +17,12 @@ file to generated repositories, and an appropriate badge to the README. Also upd
|
||||
view::Dict{String, Any}
|
||||
|
||||
function Coveralls(; config_file::Union{AbstractString, Void}=nothing)
|
||||
if config_file != nothing && !isfile(config_file)
|
||||
throw(ArgumentError("File $(abspath(config_file)) does not exist"))
|
||||
if config_file != nothing
|
||||
config_file = if isfile(config_file)
|
||||
abspath(config_file)
|
||||
else
|
||||
throw(ArgumentError("File $(abspath(config_file)) does not exist"))
|
||||
end
|
||||
end
|
||||
new(
|
||||
["*.jl.cov", "*.jl.*.cov", "*.jl.mem"],
|
||||
|
@ -19,7 +19,7 @@ adds appropriate badges to the README, and updates the `.gitignore` accordingly.
|
||||
end
|
||||
end
|
||||
# Windows Git recognizes these paths as well.
|
||||
new(["/docs/build/", "/docs/site/"], assets)
|
||||
new(["/docs/build/", "/docs/site/"], abspath.(assets))
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -20,9 +20,11 @@ generated repositories, and appropriate badge(s) to the README.
|
||||
|
||||
function GitLabCI(; config_file::Union{AbstractString, Void}="", coverage::Bool=true)
|
||||
if config_file != nothing
|
||||
if isempty(config_file)
|
||||
config_file = if isempty(config_file)
|
||||
config_file = joinpath(DEFAULTS_DIR, "gitlab-ci.yml")
|
||||
elseif !isfile(config_file)
|
||||
elseif isfile(config_file)
|
||||
abspath(config_file)
|
||||
else
|
||||
throw(ArgumentError("File $(abspath(config_file)) does not exist"))
|
||||
end
|
||||
end
|
||||
|
@ -17,9 +17,11 @@ generated repositories, and an appropriate badge to the README.
|
||||
|
||||
function TravisCI(; config_file::Union{AbstractString, Void}="")
|
||||
if config_file != nothing
|
||||
if isempty(config_file)
|
||||
config_file = if isempty(config_file)
|
||||
config_file = joinpath(DEFAULTS_DIR, "travis.yml")
|
||||
elseif !isfile(config_file)
|
||||
elseif isfile(config_file)
|
||||
abspath(config_file)
|
||||
else
|
||||
throw(ArgumentError("File $(abspath(config_file)) does not exist"))
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user