Skip to content

Commit 94d890e

Browse files
committed
Make it possible to override the URL of a dep repository
1 parent e031e69 commit 94d890e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/build_als.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ branch_gnatformat=edge
6464
branch_libgpr2=main
6565
branch_prettier_ada=main
6666

67+
# Repository URLs can be overriden (e.g. to personal forks for experimentation)
68+
# url_langkit_support=https://github.com/<my-github-login>/langkit.git
69+
6770
# Set `prod` build mode
6871
########################
6972
# for adasat,gnatformat,lal,langkit,lal_refactor,laltools,markdown,spawn
@@ -111,7 +114,10 @@ function pin_crates() {
111114
commit=$(grep "^${repo:-$crate}=" deps.txt | sed -e 's/.*=//')
112115
fi
113116

114-
URL="https://github.com/AdaCore/${repo:-$crate}.git"
117+
url_var=url_$crate
118+
url_override=${!url_var}
119+
URL=${url_override:-"https://github.com/AdaCore/${repo:-$crate}.git"}
120+
115121
if [ ! -d "subprojects/$crate" ]; then
116122
# If the checkout doesn't exist, clone
117123
git clone "$URL" "subprojects/$crate"

0 commit comments

Comments
 (0)