Skip to content

Commit 60f3076

Browse files
authored
Merge pull request #18 from DilumAluthge/dpa/readme-example-ssh-https
README: In the example, demonstrate how to use SSH for some repos and HTTPS for other repos
2 parents 8fb2703 + 73d1a0c commit 60f3076

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,23 @@ using MultiDocumenter
99
clonedir = mktempdir()
1010

1111
docs = [
12-
("JuliaDocs/Documenter.jl.git", "gh-pages") => MultiDocumenter.MultiDocRef(
12+
("JuliaDocs/Documenter.jl.git", "gh-pages", false) => MultiDocumenter.MultiDocRef(
1313
upstream = joinpath(clonedir, "Documenter"),
1414
path = "doc",
1515
name = "Documenter"
1616
),
17-
("JuliaDebug/Infiltrator.jl.git", "gh-pages") => MultiDocumenter.MultiDocRef(
17+
# using SSH for cloning is suggested when you're dealing with private repos, because
18+
# an ssh-agent will handle your keys for you
19+
# ("JuliaDebug/Infiltrator.jl.git", "gh-pages", true) => MultiDocumenter.MultiDocRef(
20+
("JuliaDebug/Infiltrator.jl.git", "gh-pages", false) => MultiDocumenter.MultiDocRef(
1821
upstream = joinpath(clonedir, "Infiltrator"),
1922
path = "inf",
2023
name = "Infiltrator"
2124
),
2225
]
2326

24-
# using SSH for cloning is suggested when you're dealing with private repos, because
25-
# an ssh-agent will handle your keys for you
26-
# prefix = "[email protected]:"
27-
prefix = "https://github.com/"
28-
29-
for ((remote, branch), docref) in docs
27+
for ((remote, branch, use_ssh), docref) in docs
28+
prefix = use_ssh ? "[email protected]:" : "https://github.com/"
3029
run(`git clone --depth 1 $prefix$remote --branch $branch --single-branch $(docref.upstream)`)
3130
end
3231

0 commit comments

Comments
 (0)