Skip to content

Commit

Permalink
Make the doc build raster data sources path a bit more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
asinghvi17 authored Jun 25, 2024
1 parent 19f92e8 commit 6d5b8f9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ import .GeoMakieDocumenterBlocks: GALLERY_DICT
# Good quality CairoMakie with PNG
CairoMakie.activate!(px_per_unit = 2, type = :png)
# Rasters should download into the artifacts folder (so they can be cached :D)
get!(ENV, "RASTERDATASOURCES_PATH", joinpath(first(Base.DEPOT_PATH), "artifacts"))
raster_data_sources_path = joinpath(first(Base.DEPOT_PATH), "artifacts")
if haskey(ENV, "CI")
# override the given setting so we don't run into path not created problems.
ENV["RASTERDATASOURCES_PATH"] = raster_data_sources_path
else
# on local machine, so respect the given setting if it exists.
get!(ENV, "RASTERDATASOURCES_PATH", raster_data_sources_path)
end
# invoke some geomakie things to be sure it works
GeoMakie.coastlines()
GeoMakie.earth()
Expand Down

0 comments on commit 6d5b8f9

Please sign in to comment.