dont download by default

This commit is contained in:
SimonDanisch 2018-10-05 12:27:01 +02:00
parent f5de5f58ce
commit ee4fc2803b

7
deps/build.jl vendored
View File

@ -1,16 +1,13 @@
#TODO: download https://cdn.plot.ly/plotly-latest.min.js to deps/ if it doesn't exist #TODO: download https://cdn.plot.ly/plotly-latest.min.js to deps/ if it doesn't exist
file_path = "" file_path = ""
if get(ENV, "PLOTS_HOST_DEPENDENCY_LOCAL", "true") == "true" if get(ENV, "PLOTS_HOST_DEPENDENCY_LOCAL", "false") == "true"
global file_path global file_path
local_fn = joinpath(dirname(@__FILE__), "plotly-latest.min.js") local_fn = joinpath(dirname(@__FILE__), "plotly-latest.min.js")
if !isfile(local_fn) if !isfile(local_fn)
@info("Cannot find deps/plotly-latest.min.js... downloading latest version.") @info("Cannot find deps/plotly-latest.min.js... downloading latest version.")
download("https://cdn.plot.ly/plotly-latest.min.js", local_fn) download("https://cdn.plot.ly/plotly-latest.min.js", local_fn)
@show local_fn isfile(local_fn) isfile(local_fn) && (file_path = local_fn)
if isfile(local_fn)
file_path = local_fn
end
else else
file_path = local_fn file_path = local_fn
end end