-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathci_prep.jl
24 lines (24 loc) · 891 Bytes
/
ci_prep.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Small script to prepare CI testing (see https://github.com/HolyLab/HolyLabRegistry
# and https://github.com/HolyLab/ImagineInterface.jl).
if VERSION ≥ v"0.7.0"
using Pkg
end
if VERSION < v"1.1.0"
using LibGit2
user_regs = joinpath(DEPOT_PATH[1],"registries")
mkpath(user_regs)
Base.shred!(LibGit2.CachedCredentials()) do creds
for (reg, url) in (
"General" => "https://github.com/JuliaRegistries/General.git",
"EmmtRegistry" => "https://github.com/emmt/EmmtRegistry")
path = joinpath(user_regs, reg);
LibGit2.with(Pkg.GitTools.clone(
url, path;
header = "registry $reg from $(repr(url))",
credentials = creds)) do repo end
end
end
else
Pkg.Registry.add("General")
Pkg.Registry.add(RegistrySpec(url="https://github.com/emmt/EmmtRegistry"))
end