Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion examples/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@ function setcached(name)
return open(f -> TOML.print(f, cache), CACHEFILE, "w")
end

checksum(name) = bytes2hex(sha256(joinpath(@__DIR__, name, "main.jl")))
# generate checksum based on path relative to ~/.../PEPSKit.jl
# such that different users do not have to rerun already cached examples
function checksum(name)
project_path = joinpath(@__DIR__, name, "main.jl")
@assert isfile(project_path)
return open(project_path, "r") do io
bytes2hex(sha256(io))
end
end

# ---------------------------------------------------------------------------------------- #
# Building
Expand Down
Loading